3#include <Foundation/Containers/HybridArray.h>
4#include <Foundation/Strings/StringView.h>
6#if PL_ENABLED(PL_PLATFORM_WINDOWS_UWP)
8# include <Foundation/Basics/Platform/Win/IncludeWindows.h>
10# include <wrl/wrappers/corewrappers.h>
28 void operator=(
const plUInt16* pUtf16);
29 void operator=(
const plUInt32* pUtf32);
30 void operator=(
const wchar_t* pUtf32);
33 PL_ALWAYS_INLINE
operator const wchar_t*()
const {
return &m_Data[0]; }
34 PL_ALWAYS_INLINE
const wchar_t* GetData()
const {
return &m_Data[0]; }
35 PL_ALWAYS_INLINE plUInt32 GetElementCount()
const {
return m_Data.GetCount() - 1; }
38 static constexpr plUInt32 BufferSize = 1024;
55#if PL_ENABLED(PL_PLATFORM_WINDOWS_UWP)
60 void operator=(
const char* szUtf8);
61 void operator=(
const plUInt16* pUtf16);
62 void operator=(
const plUInt32* pUtf32);
63 void operator=(
const wchar_t* pWChar);
65#if PL_ENABLED(PL_PLATFORM_WINDOWS_UWP)
66 void operator=(
const Microsoft::WRL::Wrappers::HString& hstring);
67 void operator=(
const HSTRING& hstring);
70 PL_ALWAYS_INLINE
operator const char*()
const
74 PL_ALWAYS_INLINE
const char* GetData()
const
78 PL_ALWAYS_INLINE plUInt32 GetElementCount()
const
80 return m_Data.GetCount() - 1;
92 static constexpr plUInt32 BufferSize = 1024;
112 void operator=(
const char* szUtf8);
113 void operator=(
const plUInt16* pUtf16);
114 void operator=(
const plUInt32* pUtf32);
115 void operator=(
const wchar_t* pUtf32);
117 PL_ALWAYS_INLINE
const plUInt16* GetData()
const {
return &m_Data[0]; }
118 PL_ALWAYS_INLINE plUInt32 GetElementCount()
const {
return m_Data.GetCount() - 1; }
121 static constexpr plUInt32 BufferSize = 1024;
139 void operator=(
const char* szUtf8);
140 void operator=(
const plUInt16* pUtf16);
141 void operator=(
const plUInt32* pUtf32);
142 void operator=(
const wchar_t* pWChar);
144 PL_ALWAYS_INLINE
const plUInt32* GetData()
const {
return &m_Data[0]; }
145 PL_ALWAYS_INLINE plUInt32 GetElementCount()
const {
return m_Data.GetCount() - 1; }
148 static constexpr plUInt32 BufferSize = 1024;
153#if PL_ENABLED(PL_PLATFORM_WINDOWS_UWP)
159class PL_FOUNDATION_DLL plStringHString
163 plStringHString(
const char* szUtf8);
164 plStringHString(
const plUInt16* szUtf16);
165 plStringHString(
const plUInt32* szUtf32);
166 plStringHString(
const wchar_t* szWChar);
168 void operator=(
const char* szUtf8);
169 void operator=(
const plUInt16* szUtf16);
170 void operator=(
const plUInt32* szUtf32);
171 void operator=(
const wchar_t* szWChar);
175 PL_ALWAYS_INLINE
const Microsoft::WRL::Wrappers::HString& GetData()
const {
return m_Data; }
178 Microsoft::WRL::Wrappers::HString m_Data;
184#include <Foundation/Strings/Implementation/StringConversion_inl.h>
Base class for all memory allocators.
Definition Allocator.h:23
static PL_ALWAYS_INLINE plAllocator * GetDefaultAllocator()
The default allocator can be used for any kind of allocation if no alignment is required.
Definition Basics.h:82
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
A very simple class to convert text to Utf16 encoding.
Definition StringConversion.h:104
This class only exists for completeness.
Definition StringConversion.h:131
A small string class that converts any other encoding to Utf8.
Definition StringConversion.h:47
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A very simple string class that should only be used to temporarily convert text to the OSes native wc...
Definition StringConversion.h:20