3#include <Foundation/Algorithm/HashingUtils.h>
4#include <Foundation/Containers/HybridArray.h>
5#include <Foundation/Strings/Implementation/StringBase.h>
6#include <Foundation/Strings/StringConversion.h>
7#include <Foundation/Strings/StringUtils.h>
8#include <Foundation/Strings/StringView.h>
26template <plUInt16 Size>
78#if PL_ENABLED(PL_INTEROP_STL_STRINGS)
86 void operator=(
const std::string_view& rhs);
144template <plUInt16 Size,
typename AllocatorWrapper = plDefaultAllocatorWrapper>
163 void operator=(
const char* szString);
164 void operator=(
const wchar_t* pString);
171#if PL_ENABLED(PL_INTEROP_STL_STRINGS)
174 void operator=(
const std::string_view& rhs);
175 void operator=(
const std::string& rhs);
194template <plUInt16 Size>
231PL_FOUNDATION_DLL
plStringView BuildString(
char* szTmp, plUInt32 uiLength,
const plString& sArg);
234#include <Foundation/Strings/Implementation/String_inl.h>
Base class for all memory allocators.
Definition Allocator.h:23
plUInt64 GetHeapMemoryUsage() const
Returns the amount of bytes that are currently allocated on the heap.
Definition DynamicArray_inl.h:234
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Interface for binary in (read) streams.
Definition Stream.h:22
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
static bool IsEqual(const char *pString1, const char *pString2, const char *pString1End=plUnicodeUtils::GetMaxStringEnd< char >(), const char *pString2End=plUnicodeUtils::GetMaxStringEnd< char >())
Returns true, if the two given strings are identical (bitwise).
Definition StringUtils_inl.h:125
static plInt32 Compare(const char *pString1, const char *pString2, const char *pString1End=plUnicodeUtils::GetMaxStringEnd< char >(), const char *pString2End=plUnicodeUtils::GetMaxStringEnd< char >())
Compares two strings for equality.
Definition StringUtils.cpp:218
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
bool IsEqual_NoCase(plStringView sOther) const
Compares this string view with the other string view for equality.
Definition StringView_inl.h:95
plInt32 Compare_NoCase(plStringView sOther) const
Compares this string with the other one. Returns 0 for equality, -1 if this string is 'smaller',...
Definition StringView.cpp:41
plInt32 Compare(plStringView sOther) const
Compares this string with the other one. Returns 0 for equality, -1 if this string is 'smaller',...
Definition StringView.cpp:31
bool IsEqual(plStringView sOther) const
Compares this string view with the other string view for equality.
Definition StringView_inl.h:90
static PL_ALWAYS_INLINE bool Less(const char *a, const char *b)
Returns true if a is less than b.
Definition String.h:224
static PL_ALWAYS_INLINE bool Equal(const char *a, const char *b)
Returns true if a is equal to b.
Definition String.h:227
A comparer object is used in sorting algorithms to compare to objects of the same type.
Definition Comparer.h:7
PL_ALWAYS_INLINE bool Less(const T &a, const T &b) const
Returns true if a is less than b.
Definition Comparer.h:9
If there is an % operator which takes a plTypeIsMemRelocatable and returns a CompileTimeTrueType T is...
Definition TypeTraits.h:67
A string class for storing and passing around strings.
Definition String.h:28
plHybridStringBase(plAllocator *pAllocator)
Creates an empty string.
Definition String_inl.h:4
const char * GetData() const
Returns a pointer to the internal Utf8 string.
Definition String_inl.h:56
plUInt32 GetElementCount() const
Returns the amount of bytes that this string takes (excluding the '\0' terminator).
Definition String_inl.h:65
plStringView GetFirst(plUInt32 uiNumCharacters) const
Returns a view to the sub-string containing the first uiNumCharacters characters of this string.
Definition String_inl.h:144
plUInt32 GetCharacterCount() const
Returns the number of characters in this string. Might be less than GetElementCount,...
Definition String_inl.h:71
~plHybridStringBase()
Destructor.
plStringView GetSubString(plUInt32 uiFirstCharacter, plUInt32 uiNumCharacters) const
Returns a view to a sub-string of this string, starting at character uiFirstCharacter,...
Definition String_inl.h:131
void ReadAll(plStreamReader &inout_stream)
Replaces the current string with the content from the stream. Reads the stream to its end.
Definition AllStrings_inl.h:58
void Clear()
Resets this string to an empty string.
Definition String_inl.h:49
void operator=(const plHybridStringBase &rhs)
Copies the data from rhs.
Definition String_inl.h:96
plUInt64 GetHeapMemoryUsage() const
Returns the amount of bytes that are currently allocated on the heap.
Definition String.h:134
plStringView GetLast(plUInt32 uiNumCharacters) const
Returns a view to the sub-string containing the last uiNumCharacters characters of this string.
Definition String_inl.h:150
Base class for strings, which implements all read-only string functions.
Definition StringBase.h:14