From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Plugins/General/gen_ml/gaystring.h | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Src/Plugins/General/gen_ml/gaystring.h (limited to 'Src/Plugins/General/gen_ml/gaystring.h') diff --git a/Src/Plugins/General/gen_ml/gaystring.h b/Src/Plugins/General/gen_ml/gaystring.h new file mode 100644 index 00000000..54b39005 --- /dev/null +++ b/Src/Plugins/General/gen_ml/gaystring.h @@ -0,0 +1,44 @@ +#ifndef _GAYSTRING_H_ +#define _GAYSTRING_H_ + +#include + +class GayString +{ +public: + GayString(const char *initial=NULL); + ~GayString(); + void Set(const char *value); + char *Get(); + + void Append(const char *append); + void Grow(size_t newsize); + void Compact(); + size_t Length(); + +private: + char *m_buf; + size_t m_alloc; + size_t len; +}; + +class GayStringW +{ +public: + GayStringW(const wchar_t *initial=NULL); + ~GayStringW(); + void Set(const wchar_t *value); + const wchar_t *Get(); + + void Append(const wchar_t *append); + void Grow(size_t newsize); + void Compact(); + size_t Length(); + +private: + wchar_t *m_buf; + size_t m_alloc; + size_t len; +}; + +#endif//_GAYSTRING_H_ \ No newline at end of file -- cgit