Plasma Engine  2.0
Loading...
Searching...
No Matches
plHybridString< Size, AllocatorWrapper > Struct Template Reference

#include <String.h>

Inheritance diagram for plHybridString< Size, AllocatorWrapper >:

Public Member Functions

 plHybridString (plAllocator *pAllocator)
 
 plHybridString (const plHybridString< Size, AllocatorWrapper > &other)
 
 plHybridString (const plHybridStringBase< Size > &other)
 
 plHybridString (const char *rhs)
 
 plHybridString (const wchar_t *rhs)
 
 plHybridString (const plStringView &rhs)
 
 plHybridString (const plStringBuilder &rhs)
 
 plHybridString (plStringBuilder &&rhs)
 
 plHybridString (plHybridString< Size, AllocatorWrapper > &&other)
 
 plHybridString (plHybridStringBase< Size > &&other)
 
void operator= (const plHybridString< Size, AllocatorWrapper > &rhs)
 
void operator= (const plHybridStringBase< Size > &rhs)
 
void operator= (const char *szString)
 
void operator= (const wchar_t *pString)
 
void operator= (const plStringView &rhs)
 
void operator= (const plStringBuilder &rhs)
 
void operator= (plStringBuilder &&rhs)
 
void operator= (plHybridString< Size, AllocatorWrapper > &&rhs)
 
void operator= (plHybridStringBase< Size > &&rhs)
 
- Public Member Functions inherited from plHybridStringBase< Size >
void Clear ()
 Resets this string to an empty string.
 
const char * GetData () const
 Returns a pointer to the internal Utf8 string.
 
plUInt32 GetElementCount () const
 Returns the amount of bytes that this string takes (excluding the '\0' terminator).
 
plUInt32 GetCharacterCount () const
 Returns the number of characters in this string. Might be less than GetElementCount, if it contains Utf8 multi-byte characters.
 
plStringView GetSubString (plUInt32 uiFirstCharacter, plUInt32 uiNumCharacters) const
 Returns a view to a sub-string of this string, starting at character uiFirstCharacter, up until uiFirstCharacter + uiNumCharacters.
 
plStringView GetFirst (plUInt32 uiNumCharacters) const
 Returns a view to the sub-string containing the first uiNumCharacters characters of this string.
 
plStringView GetLast (plUInt32 uiNumCharacters) const
 Returns a view to the sub-string containing the last uiNumCharacters characters of this string.
 
void ReadAll (plStreamReader &inout_stream)
 Replaces the current string with the content from the stream. Reads the stream to its end.
 
plUInt64 GetHeapMemoryUsage () const
 Returns the amount of bytes that are currently allocated on the heap.
 
- Public Member Functions inherited from plStringBase< plHybridStringBase< Size > >
bool IsEmpty () const
 Returns whether the string is an empty string.
 
bool StartsWith (plStringView sStartsWith) const
 Returns true, if this string starts with the given string.
 
bool StartsWith_NoCase (plStringView sStartsWith) const
 Returns true, if this string starts with the given string. Case insensitive.
 
bool EndsWith (plStringView sEndsWith) const
 Returns true, if this string ends with the given string.
 
bool EndsWith_NoCase (plStringView sEndsWith) const
 Returns true, if this string ends with the given string. Case insensitive.
 
const char * FindSubString (plStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindSubString_NoCase (plStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindLastSubString (plStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindLastSubString_NoCase (plStringView sStringToFind, const char *szStartSearchAt=nullptr) const
 
const char * FindWholeWord (const char *szSearchFor, plStringUtils::PL_CHARACTER_FILTER isDelimiterCB, const char *szStartSearchAt=nullptr) const
 
const char * FindWholeWord_NoCase (const char *szSearchFor, plStringUtils::PL_CHARACTER_FILTER isDelimiterCB, const char *szStartSearchAt=nullptr) const
 
plInt32 Compare (plStringView sOther) const
 Compares this string with the other one. Returns 0 for equality, -1 if this string is 'smaller', 1 otherwise.
 
plInt32 CompareN (plStringView sOther, plUInt32 uiCharsToCompare) const
 
plInt32 Compare_NoCase (plStringView sOther) const
 Compares this string with the other one. Returns 0 for equality, -1 if this string is 'smaller', 1 otherwise. Case insensitive.
 
plInt32 CompareN_NoCase (plStringView sOther, plUInt32 uiCharsToCompare) const
 
bool IsEqual (plStringView sOther) const
 Compares this string with the other string for equality.
 
bool IsEqualN (plStringView sOther, plUInt32 uiCharsToCompare) const
 Compares up to a given number of characters of this string with the other string for equality. Case insensitive.
 
bool IsEqual_NoCase (plStringView sOther) const
 Compares this string with the other string for equality.
 
bool IsEqualN_NoCase (plStringView sOther, plUInt32 uiCharsToCompare) const
 Compares up to a given number of characters of this string with the other string for equality. Case insensitive.
 
const char * ComputeCharacterPosition (plUInt32 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 plStringView () const
 Returns a string view to this string's data.
 
plStringView GetView () const
 Returns a string view to this string's data.
 
PL_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 plStringView's which represent each found substring. If bReturnEmptyStrings is true, even empty strings between separators are returned. Output must be a container that stores plStringView'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 (plStringView 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.
 
plStringView GetFileExtension () const
 Returns the file extension of the given path. Will be empty, if the path does not end with a proper extension.
 
plStringView GetFileName () const
 Returns the file name of a path, excluding the path and extension.
 
plStringView GetFileNameAndExtension () const
 Returns the substring that represents the file name including the file extension.
 
plStringView 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 plFileSystem for details.
 
plStringView GetRootedPathRootName () const
 Extracts the root name from a rooted path.
 

Additional Inherited Members

- Public Types inherited from plStringBase< plHybridStringBase< Size > >
using iterator
 
using const_iterator
 
using reverse_iterator
 
using const_reverse_iterator
 
- Protected Member Functions inherited from plHybridStringBase< Size >
 plHybridStringBase (plAllocator *pAllocator)
 Creates an empty string.
 
 plHybridStringBase (const plHybridStringBase &rhs, plAllocator *pAllocator)
 Copies the data from rhs.
 
 plHybridStringBase (plHybridStringBase &&rhs, plAllocator *pAllocator)
 Moves the data from rhs.
 
 plHybridStringBase (const char *rhs, plAllocator *pAllocator)
 Copies the data from rhs.
 
 plHybridStringBase (const wchar_t *rhs, plAllocator *pAllocator)
 Copies the data from rhs.
 
 plHybridStringBase (const plStringView &rhs, plAllocator *pAllocator)
 Copies the data from rhs.
 
 plHybridStringBase (const plStringBuilder &rhs, plAllocator *pAllocator)
 Copies the data from rhs.
 
 plHybridStringBase (plStringBuilder &&rhs, plAllocator *pAllocator)
 Moves the data from rhs.
 
 ~plHybridStringBase ()
 Destructor.
 
void operator= (const plHybridStringBase &rhs)
 Copies the data from rhs.
 
void operator= (plHybridStringBase &&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 plStringView &rhs)
 Copies the data from rhs.
 
void operator= (const plStringBuilder &rhs)
 Copies the data from rhs.
 
void operator= (plStringBuilder &&rhs)
 Moves the data from rhs.
 

Detailed Description

template<plUInt16 Size, typename AllocatorWrapper = plDefaultAllocatorWrapper>
struct plHybridString< Size, AllocatorWrapper >
See also
plHybridStringBase

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