ezEngine Release 25.08
Loading...
Searching...
No Matches
ezHybridString< Size, AllocatorWrapper > Struct Template Reference

#include <String.h>

Inheritance diagram for ezHybridString< Size, AllocatorWrapper >:

Public Member Functions

 ezHybridString (ezAllocator *pAllocator)
 
 ezHybridString (const ezHybridString< Size, AllocatorWrapper > &other)
 
 ezHybridString (const ezHybridStringBase< Size > &other)
 
 ezHybridString (const char *rhs)
 
 ezHybridString (const wchar_t *rhs)
 
 ezHybridString (const ezStringView &rhs)
 
 ezHybridString (const ezStringBuilder &rhs)
 
 ezHybridString (ezStringBuilder &&rhs)
 
 ezHybridString (ezHybridString< Size, AllocatorWrapper > &&other)
 
 ezHybridString (ezHybridStringBase< Size > &&other)
 
void operator= (const ezHybridString< Size, AllocatorWrapper > &rhs)
 
void operator= (const ezHybridStringBase< Size > &rhs)
 
void operator= (const char *szString)
 
void operator= (const wchar_t *pString)
 
void operator= (const ezStringView &rhs)
 
void operator= (const ezStringBuilder &rhs)
 
void operator= (ezStringBuilder &&rhs)
 
void operator= (ezHybridString< Size, AllocatorWrapper > &&rhs)
 
void operator= (ezHybridStringBase< Size > &&rhs)
 
- Public Member Functions inherited from ezHybridStringBase< Size >
void Clear ()
 Resets this string to an empty string.
 
const char * GetData () const
 Returns a pointer to the internal Utf8 string.
 
ezUInt32 GetElementCount () const
 Returns the amount of bytes that this string takes (excluding the '\0' terminator).
 
ezUInt32 GetCharacterCount () const
 Returns the number of characters in this string. Might be less than GetElementCount, if it contains Utf8 multi-byte characters.
 
ezStringView GetSubString (ezUInt32 uiFirstCharacter, ezUInt32 uiNumCharacters) const
 Returns a view to a sub-string of this string, starting at character uiFirstCharacter, up until uiFirstCharacter + uiNumCharacters.
 
ezStringView GetFirst (ezUInt32 uiNumCharacters) const
 Returns a view to the sub-string containing the first uiNumCharacters characters of this string.
 
ezStringView GetLast (ezUInt32 uiNumCharacters) const
 Returns a view to the sub-string containing the last uiNumCharacters characters of this string.
 
void ReadAll (ezStreamReader &inout_stream)
 Replaces the current string with the content from the stream. Reads the stream to its end.
 
ezUInt64 GetHeapMemoryUsage () const
 Returns the amount of bytes that are currently allocated on the heap.
 
- Public Member Functions inherited from ezStringBase< ezHybridStringBase< Size > >
bool IsEmpty () const
 Returns whether the string is an empty string.
 
bool StartsWith (ezStringView sStartsWith) const
 Returns true, if this string starts with the given string.
 
bool StartsWith_NoCase (ezStringView sStartsWith) const
 Returns true, if this string starts with the given string. Case insensitive.
 
bool EndsWith (ezStringView sEndsWith) const
 Returns true, if this string ends with the given string.
 
bool EndsWith_NoCase (ezStringView sEndsWith) const
 Returns true, if this string ends with the given string. Case insensitive.
 
const char * FindSubString (ezStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindSubString_NoCase (ezStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindLastSubString (ezStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindLastSubString_NoCase (ezStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindWholeWord (const char *szSearchFor, ezStringUtils::EZ_CHARACTER_FILTER isDelimiterCB, const char *szStartSearchAt=nullptr) const
 
const char * FindWholeWord_NoCase (const char *szSearchFor, ezStringUtils::EZ_CHARACTER_FILTER isDelimiterCB, const char *szStartSearchAt=nullptr) const
 
ezInt32 Compare (ezStringView sOther) const
 Compares this string with the other one. Returns 0 for equality, -1 if this string is 'smaller', 1 otherwise.
 
ezInt32 CompareN (ezStringView sOther, ezUInt32 uiCharsToCompare) const
 
ezInt32 Compare_NoCase (ezStringView sOther) const
 Compares this string with the other one. Returns 0 for equality, -1 if this string is 'smaller', 1 otherwise. Case insensitive.
 
ezInt32 CompareN_NoCase (ezStringView sOther, ezUInt32 uiCharsToCompare) const
 
bool IsEqual (ezStringView sOther) const
 Compares this string with the other string for equality.
 
bool IsEqualN (ezStringView sOther, ezUInt32 uiCharsToCompare) const
 Compares up to a given number of characters of this string with the other string for equality. Case insensitive.
 
bool IsEqual_NoCase (ezStringView sOther) const
 Compares this string with the other string for equality.
 
bool IsEqualN_NoCase (ezStringView sOther, ezUInt32 uiCharsToCompare) const
 Compares up to a given number of characters of this string with the other string for equality. Case insensitive.
 
const char * ComputeCharacterPosition (ezUInt32 uiCharacterIndex) const
 Computes the pointer to the n-th character in the string. This is a linear search from the start.
 
iterator GetIteratorFront () const
 Returns an iterator to this string, which points to the very first character.
 
reverse_iterator GetIteratorBack () const
 Returns an iterator to this string, which points to the very last character (NOT the end).
 
 operator ezStringView () const
 Returns a string view to this string's data.
 
ezStringView GetView () const
 Returns a string view to this string's data.
 
EZ_ALWAYS_INLINE operator const char * () const
 Returns a pointer to the internal Utf8 string.
 
void Split (bool bReturnEmptyStrings, Container &ref_output, const char *szSeparator1, const char *szSeparator2=nullptr, const char *szSeparator3=nullptr, const char *szSeparator4=nullptr, const char *szSeparator5=nullptr, const char *szSeparator6=nullptr) const
 Fills the given container with ezStringView's which represent each found substring. If bReturnEmptyStrings is true, even empty strings between separators are returned. Output must be a container that stores ezStringView's and provides the functions 'Clear' and 'Append'. szSeparator1 to szSeparator6 are strings which act as separators and indicate where to split the string. This string itself will not be modified.
 
bool HasAnyExtension () const
 Checks whether the given path has any file extension.
 
bool HasExtension (ezStringView sExtension) const
 Checks whether the given path ends with the given extension. szExtension should start with a '.' for performance reasons, but it will work without a '.' too.
 
ezStringView GetFileExtension (bool bFullExtension=false) const
 Returns the file extension of the given path. Will be empty, if the path does not end with a proper extension.
 
ezStringView GetFileName () const
 Returns the file name of a path, excluding the path and extension.
 
ezStringView GetFileNameAndExtension () const
 Returns the substring that represents the file name including the file extension.
 
ezStringView GetFileDirectory () const
 Returns the directory of the given file, which is the substring up to the last path separator.
 
bool IsAbsolutePath () const
 Returns true, if the given path represents an absolute path on the current OS.
 
bool IsRelativePath () const
 Returns true, if the given path represents a relative path on the current OS.
 
bool IsRootedPath () const
 Returns true, if the given path represents a 'rooted' path. See ezFileSystem for details.
 
ezStringView GetRootedPathRootName () const
 Extracts the root name from a rooted path.
 

Additional Inherited Members

- Public Types inherited from ezStringBase< ezHybridStringBase< Size > >
using iterator = ezStringIterator
 
using const_iterator = ezStringIterator
 
using reverse_iterator = ezStringReverseIterator
 
using const_reverse_iterator = ezStringReverseIterator
 
- Protected Member Functions inherited from ezHybridStringBase< Size >
 ezHybridStringBase (ezAllocator *pAllocator)
 Creates an empty string.
 
 ezHybridStringBase (const ezHybridStringBase &rhs, ezAllocator *pAllocator)
 Copies the data from rhs.
 
 ezHybridStringBase (ezHybridStringBase &&rhs, ezAllocator *pAllocator)
 Moves the data from rhs.
 
 ezHybridStringBase (const char *rhs, ezAllocator *pAllocator)
 Copies the data from rhs.
 
 ezHybridStringBase (const wchar_t *rhs, ezAllocator *pAllocator)
 Copies the data from rhs.
 
 ezHybridStringBase (const ezStringView &rhs, ezAllocator *pAllocator)
 Copies the data from rhs.
 
 ezHybridStringBase (const ezStringBuilder &rhs, ezAllocator *pAllocator)
 Copies the data from rhs.
 
 ezHybridStringBase (ezStringBuilder &&rhs, ezAllocator *pAllocator)
 Moves the data from rhs.
 
 ~ezHybridStringBase ()
 Destructor.
 
void operator= (const ezHybridStringBase &rhs)
 Copies the data from rhs.
 
void operator= (ezHybridStringBase &&rhs)
 Moves the data from rhs.
 
void operator= (const char *rhs)
 Copies the data from rhs.
 
void operator= (const wchar_t *rhs)
 Copies the data from rhs.
 
void operator= (const ezStringView &rhs)
 Copies the data from rhs.
 
void operator= (const ezStringBuilder &rhs)
 Copies the data from rhs.
 
void operator= (ezStringBuilder &&rhs)
 Moves the data from rhs.
 

Detailed Description

template<ezUInt16 Size, typename AllocatorWrapper = ezDefaultAllocatorWrapper>
struct ezHybridString< Size, AllocatorWrapper >
See also
ezHybridStringBase

The documentation for this struct was generated from the following files: