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/auth/Loginbox/stringBuilder.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Src/auth/Loginbox/stringBuilder.h (limited to 'Src/auth/Loginbox/stringBuilder.h') diff --git a/Src/auth/Loginbox/stringBuilder.h b/Src/auth/Loginbox/stringBuilder.h new file mode 100644 index 00000000..cc2170b7 --- /dev/null +++ b/Src/auth/Loginbox/stringBuilder.h @@ -0,0 +1,31 @@ +#ifndef NULLSOFT_WINAMP_STRING_BUILDER_HEADER +#define NULLSOFT_WINAMP_STRING_BUILDER_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include + +class StringBuilder +{ +public: + StringBuilder(); + ~StringBuilder(); + +public: + HRESULT Allocate(size_t newSize); + void Clear(void); + LPCWSTR Get(void); + HRESULT Set(size_t index, WCHAR value); + HRESULT Append(LPCWSTR pszString); + + +protected: + LPWSTR buffer; + LPWSTR cursor; + size_t allocated; + size_t remaining; +}; + +#endif //NULLSOFT_WINAMP_STRING_BUILDER_HEADER \ No newline at end of file -- cgit