"L. Spiro Engine"
|
#include <LSTLStringBase.h>
Classes | |
struct | LSSTD_RANGE |
Public Types | |
typedef struct lstl::CStringBase::LSSTD_RANGE * | LPLSSTD_RANGE |
typedef struct lstl::CStringBase::LSSTD_RANGE | LPCLSSTD_RANGE |
Public Member Functions | |
LSE_CALL | CStringBase (CAllocator *_paAllocator=NULL) |
LSE_CALL | CStringBase (const _tDataType &_dtValue, CAllocator *_paAllocator=NULL) |
LSE_CALL | CStringBase (const _tDataType *_pdtValue, CAllocator *_paAllocator=NULL) |
LSE_CALL | CStringBase (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString, CAllocator *_paAllocator=NULL) |
CStringBase< _tDerived, _tDataType, _uAllocSize > LSE_CALL | operator+ (const _tDataType &_dtValue) |
CStringBase< _tDerived, _tDataType, _uAllocSize > LSE_CALL | operator+ (const _tDataType *_pdtValue) |
CStringBase< _tDerived, _tDataType, _uAllocSize > LSE_CALL | operator+ (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) |
CStringBase< _tDerived, _tDataType, _uAllocSize > &LSE_CALL | operator+= (const _tDataType &_dtValue) |
CStringBase< _tDerived, _tDataType, _uAllocSize > &LSE_CALL | operator+= (const _tDataType *_pdtValue) |
CStringBase< _tDerived, _tDataType, _uAllocSize > &LSE_CALL | operator+= (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) |
LSBOOL LSE_CALL | operator== (const _tDataType *_pdtValue) const |
LSBOOL LSE_CALL | operator== (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSBOOL LSE_CALL | operator!= (const _tDataType *_pdtValue) const |
LSBOOL LSE_CALL | operator!= (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSBOOL LSE_CALL | operator< (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSBOOL LSE_CALL | operator> (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSBOOL LSE_CALL | AllocateAtLeast (LSUINT32 _ui32Total) |
LSVOID LSE_CALL | Reset () |
LSVOID LSE_CALL | Trash () |
LSVOID LSE_CALL | ResetNoDealloc () |
LSVOID LSE_CALL | SetAllocator (CAllocator *_paAllocator) |
CAllocator *LSE_CALL | GetAllocator () |
LSVOID LSE_CALL | Snap () |
LSUINT32 LSE_CALL | Length () const |
const _tDataType *LSE_CALL | CStr () const |
LSBOOL LSE_CALL | Append (const _tDataType &_dtValue) |
LSBOOL LSE_CALL | Append (const _tDataType *_pdtValue, LSUINT32 _ui32Len) |
LSBOOL LSE_CALL | Append (const _tDataType *_pdtValue) |
LSBOOL LSE_CALL | Append (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) |
LSVOID LSE_CALL | RemChar (LSUINT32 _ui32Index) |
LSVOID LSE_CALL | RemChars (LSUINT32 _ui32Index, LSUINT32 _ui32Total) |
LSVOID LSE_CALL | RemRange (const LSSTD_RANGE &_rRange) |
LSBOOL LSE_CALL | RemLastChar () |
LSBOOL LSE_CALL | Set (const _tDataType *_pdtValue, LSUINT32 _ui32Len) |
LSBOOL LSE_CALL | Set (const _tDataType *_pdtValue) |
LSBOOL LSE_CALL | Set (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) |
LSBOOL LSE_CALL | Replace (const LSSTD_RANGE &_rRange, const _tDataType *_pdtValue, LSUINT32 _ui32Len) |
LSBOOL LSE_CALL | Replace (const LSSTD_RANGE &_rRange, const _tDataType *_pdtValue) |
LSBOOL LSE_CALL | Insert (LSUINT32 _ui32Pos, const _tDataType *_pdtValue, LSUINT32 _ui32Len) |
LSBOOL LSE_CALL | Insert (LSUINT32 _ui32Pos, const _tDataType *_pdtValue) |
LSBOOL LSE_CALL | Insert (LSUINT32 _ui32Pos, _tDataType _dtValue) |
_tDataType LSE_CALL | GetLastChar () const |
CStringBase< _tDerived, _tDataType, _uAllocSize > LSE_CALL | GetToken (_tDataType _tDelimiter, LSUINT32 _ui32Index) const |
LSSTD_RANGE LSE_CALL | FindStringMatchCase (LSUINT32 _ui32Start, const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSSTD_RANGE LSE_CALL | FindString (LSUINT32 _ui32Start, const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSSTD_RANGE LSE_CALL | FindWildcardStringMatchCase (LSUINT32 _ui32Start, const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSUINT32 LSE_CALL | FindAndReplaceWildcardStringMatchCase (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbReplaceMe, const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbWithMe, LSBOOL _bWholeWords=false) |
LSUINT32 LSE_CALL | FindAndReplaceChar (_tDataType _tReplaceMe, _tDataType _tWithMe) |
LSBOOL LSE_CALL | IsWholeWord (LSSTD_RANGE _rRange) const |
CStringBase< _tDerived, _tDataType, _uAllocSize > &LSE_CALL | RemoveWhitespace () |
CStringBase< _tDerived, _tDataType, _uAllocSize > LSE_CALL | DecodeEscapeSequences () const |
LSINT32 LSE_CALL | Cmp (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSINT32 LSE_CALL | ICmp (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSINT32 LSE_CALL | ICmpSubString (LSUINT32 _ui32Loc, const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
LSUINT32 LSE_CALL | CmpWildcard (LSUINT32 _ui32Start, const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString, LSUINT32 _ui32MaxWildcardLen) const |
LSBOOL LSE_CALL | Equals (const CStringBase< _tDerived, _tDataType, _uAllocSize > &_sbString) const |
Static Public Member Functions | |
static _tDataType LSE_CALL | DecodeEscape (const _tDataType *_pdtValue, LSUINT32 _ui32Len, LSUINT32 &_ui32Size) |
Protected Member Functions | |
LSUINT32 LSE_CALL | StrLen (const _tDataType *_pdtValue) const |
Class CStringBase
Description: The base of strings.
typedef struct lstl::CStringBase::LSSTD_RANGE * lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::LPLSSTD_RANGE |
A range of characters.
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::AllocateAtLeast | ( | LSUINT32 | _ui32Total | ) | [inline] |
Allocate the given number of characters.
_ui32Total | The new total number of values to allocate. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Append | ( | const _tDataType & | _dtValue | ) | [inline] |
Append a character. Returns false if the append failed (due to memory). NULL characters CAN be appended to the string.
_dtValue | The character to append. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Append | ( | const _tDataType * | _pdtValue, |
LSUINT32 | _ui32Len | ||
) | [inline] |
Append a string of characters. Returns false if the append failed (due to memory). The string of characters can contain any characters, including NULL characters.
_pdtValue | Pointer to the characters to append to this string. |
_ui32Len | Number of characters to append to this string. |
Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Append | ( | const _tDataType * | _pdtValue | ) | [inline] |
Append a string of characters. Returns false if the append failed (due to memory). The string must be NULL-terminated.
_pdtValue | Pointer to the NULL-terminated characters to append to this string. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Append | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | [inline] |
Append another string object. Returns false if the append failed (due to memory).
_sbString | The string object to append to this string. |
LSINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Cmp | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
Lexicographically compare this string with another. Both strings are compared to their fullest length until a mismatched character is found. This means that NULL characters inside the string do not stop the comparison (unless, of course, the other string does not have a NULL at the same position). If one string is shorter than the other, but the other string contains only NULL characters beyond the length of the shorter string, both strings are considered equal. For this reason, Cmp() can only be used to determine equality when standard-style strings are being used. When neither string has a NULL character aside from the terminating NULL, this function behaves exactly like the standard C strcmp().
_sbString | The string against which to compare this string. |
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::CmpWildcard | ( | LSUINT32 | _ui32Start, |
const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString, | ||
LSUINT32 | _ui32MaxWildcardLen | ||
) | const [inline] |
Perform a wildcard comparison at the given position within this string.
_ui32Start | The location from where to search, inclusive. |
_sbString | The wildcard string to locate within this string object. |
_ui32MaxWildcardLen | The wildcard string to locate within this string object. |
const _tDataType* LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::CStr | ( | ) | const [inline] |
Get the C-string pointer. For read only!
static _tDataType LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::DecodeEscape | ( | const _tDataType * | _pdtValue, |
LSUINT32 | _ui32Len, | ||
LSUINT32 & | _ui32Size | ||
) | [inline, static] |
Decode a single escape sequence.
_pdtValue | Pointer to the escape sequence to decode. |
_ui32Len | Number of characters in the sequence to which _pdtValue points. |
_ui32Size | Upon return this holds the number of characters consumed by the escape sequence. |
The actual character to find.
The character to write to the string.
CStringBase<_tDerived, _tDataType, _uAllocSize> LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::DecodeEscapeSequences | ( | ) | const [inline] |
Create a string that represents the character-converted version of this string. Character conversions can be made by using the where XX are 2 hexadecimal digits that represent the actual binary character to place at that position in the string. This string is the input, and should be in the form containing the characters. The output is the binary form of this string after the characters have been converted. For example, if this string is: The then the output will be: The Apple Characters and expanded into a new-line pair of characters (0x0D and 0x0A). The allocator used in the new string is the same as the one used in this string. Additional characters are: (0x0D)
(0x0A) (0x09) \' " \? \ (0x5C)
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Equals | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::FindAndReplaceChar | ( | _tDataType | _tReplaceMe, |
_tDataType | _tWithMe | ||
) | [inline] |
Finds and replaces all occurrences of the given character.
_tReplaceMe | The character to find. |
_tWithMe | The character to which to replace the found character. |
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::FindAndReplaceWildcardStringMatchCase | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbReplaceMe, |
const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbWithMe, | ||
LSBOOL | _bWholeWords = false |
||
) | [inline] |
Finds and replaces all occurrences of the given wildcard string. Comparisons are case-sensitive.
_sbReplaceMe | The string to replace within this string. String is in wildcard format. |
_sbWithMe | The string with which to replace matches of _sbReplaceMe within this string. |
_bWholeWords | If true, only whole words are replaced. |
LSSTD_RANGE LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::FindString | ( | LSUINT32 | _ui32Start, |
const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ||
) | const [inline] |
Finds the first occurrence of the given input string from the given starting position. If the given string is not found, the ui32End member of the return is set to 0 and the ui32Start member is set to the length of the string. The search is case-insensitive.
_ui32Start | The location from where to search, inclusive. |
_sbString | The string to locate within this string object. |
LSSTD_RANGE LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::FindStringMatchCase | ( | LSUINT32 | _ui32Start, |
const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ||
) | const [inline] |
Finds the first occurrence of the given input string from the given starting position. If the given string is not found, the ui32End member of the return is set to 0 and the ui32Start member is set to the length of the string.
_ui32Start | The location from where to search, inclusive. |
_sbString | The string to locate within this string object. |
LSSTD_RANGE LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::FindWildcardStringMatchCase | ( | LSUINT32 | _ui32Start, |
const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ||
) | const [inline] |
Finds the first occurrence of the given input wildcard string from the given starting position. If the given wildcard string is not found, the ui32End member of the return is set to 0 and the ui32Start member is set to the length of the string.
_ui32Start | The location from where to search, inclusive. |
_sbString | The string to locate within this string object. |
CAllocator* LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::GetAllocator | ( | ) | [inline] |
Get the allocator used by this object.
Reimplemented from lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize >.
_tDataType LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::GetLastChar | ( | ) | const [inline] |
Get the last character in the string If no such character exists, the zero character is returned.
CStringBase<_tDerived, _tDataType, _uAllocSize> LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::GetToken | ( | _tDataType | _tDelimiter, |
LSUINT32 | _ui32Index | ||
) | const [inline] |
Get a token from this string.
_tDelimiter | The token delimiter |
_ui32Index | Index of the token to get. |
LSINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::ICmp | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
Same as Cmp() but uses case-insensitivity to perform the comparison.
_sbString | The string against which to compare this string. |
LSINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::ICmpSubString | ( | LSUINT32 | _ui32Loc, |
const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ||
) | const [inline] |
Same as Cmp() but uses case-insensitivity to perform the comparison.
_ui32Loc | Index from which to begin testing characters within this string. |
_sbString | The string against which to compare this string. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Insert | ( | LSUINT32 | _ui32Pos, |
const _tDataType * | _pdtValue | ||
) | [inline] |
Insert characters at a given position in the string. The string to which _pdtValue points must be NULL-terminated.
_ui32Pos | Position at which to insert the characters. |
_pdtValue | Pointer to the characters to insert into this string. which must be NULL-terminated. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Insert | ( | LSUINT32 | _ui32Pos, |
_tDataType | _dtValue | ||
) | [inline] |
Insert a single character at a given position.
_ui32Pos | Position at which to insert the character. |
_dtValue | The value to insert into this string. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Insert | ( | LSUINT32 | _ui32Pos, |
const _tDataType * | _pdtValue, | ||
LSUINT32 | _ui32Len | ||
) | [inline] |
Insert characters at a given position in the string.
_ui32Pos | Position at which to insert the characters. |
_pdtValue | Pointer to the characters to insert into this string. |
_ui32Len | The number of characters to which _pdtValue points. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::IsWholeWord | ( | LSSTD_RANGE | _rRange | ) | const [inline] |
Checks if the given range surrounds a whole word or not.
_rRange | The range to check. |
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Length | ( | ) | const [inline] |
Get the length of the string.
Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator!= | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
Do we not equal another string?
_sbString | The string against which this string is to be compared for a match. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator!= | ( | const _tDataType * | _pdtValue | ) | const [inline] |
Do we not equal another NULL-terminated character array?
_pdtValue | The character array against which this string is to be compared for a match. |
CStringBase<_tDerived, _tDataType, _uAllocSize> LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator+ | ( | const _tDataType * | _pdtValue | ) | [inline] |
Append this string with a NULL-terminated character array and return the result as a new string. The returned string uses the same allocator as this string.
_pdtValue | The character array to append. |
CStringBase<_tDerived, _tDataType, _uAllocSize> LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator+ | ( | const _tDataType & | _dtValue | ) | [inline] |
Append this string with a character and return the result as a new string. The returned string uses the same allocator as this string.
_dtValue | The character to append. |
CStringBase<_tDerived, _tDataType, _uAllocSize> LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator+ | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | [inline] |
Append this string with another string and return the result as a new string. The returned string uses the same allocator as this string.
_sbString | The string to append. |
CStringBase<_tDerived, _tDataType, _uAllocSize>& LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator+= | ( | const _tDataType * | _pdtValue | ) | [inline] |
Append a NULL-terminated character array to this string and return this string as the result.
_pdtValue | The NULL-terminated character array to append to this string. |
CStringBase<_tDerived, _tDataType, _uAllocSize>& LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator+= | ( | const _tDataType & | _dtValue | ) | [inline] |
Append a character to this string and return this string as the result.
_dtValue | The character to append to this string. |
CStringBase<_tDerived, _tDataType, _uAllocSize>& LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator+= | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | [inline] |
Append a string to this string and return this string as the result.
_sbString | The string to append to this string. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator< | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
Are we lexicographically less than another string? Comparison is case-sensitive.
_sbString | The string against which we are to be compared. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator== | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
Do we equal another string?
_sbString | The string against which this string is to be compared for a match. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator== | ( | const _tDataType * | _pdtValue | ) | const [inline] |
Do we equal another NULL-terminated character array?
_pdtValue | The character array against which this string is to be compared for a match. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator> | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | const [inline] |
Are we lexicographically gretaer than another string? Comparison is case-sensitive.
_sbString | The string against which we are to be compared. |
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemChar | ( | LSUINT32 | _ui32Index | ) | [inline] |
Remove a character at a given index. If the index is out of bounds, no action is performed.
_ui32Index | The index of the character to remove. |
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemChars | ( | LSUINT32 | _ui32Index, |
LSUINT32 | _ui32Total | ||
) | [inline] |
Remove a series of characters beginning at a given index. Any characters not in bounds are ignored.
_ui32Index | The starting index of the characters to be removed. |
_ui32Total | The total number of characters to remove. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemLastChar | ( | ) | [inline] |
Remove the last character from the string, if there is one.
CStringBase<_tDerived, _tDataType, _uAllocSize>& LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemoveWhitespace | ( | ) | [inline] |
Remove whitespace characters from the front and read of the string. Whitespace characters are characters returned by CStd::IsWhitespace().
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemRange | ( | const LSSTD_RANGE & | _rRange | ) | [inline] |
Remove a range of characters.
_rRange | Range of characters to remove. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Replace | ( | const LSSTD_RANGE & | _rRange, |
const _tDataType * | _pdtValue, | ||
LSUINT32 | _ui32Len | ||
) | [inline] |
Set a range of characters to a new value. The range of characters is removed, then the new value is inserted at the start position of the range.
_rRange | Range of characters to replace with the given set of characters. |
_pdtValue | Pointer to the characters to replace in this string. |
_ui32Len | The number of characters to which _pdtValue points. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Replace | ( | const LSSTD_RANGE & | _rRange, |
const _tDataType * | _pdtValue | ||
) | [inline] |
Set a range of characters to a new value. The range of characters is removed, then the new value is inserted at the start position of the range.
_rRange | Range of characters to replace with the given set of characters. |
_pdtValue | Pointer to the NULL-terminated characters to which to replace the range of characters in this string. |
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Reset | ( | ) | [inline] |
Reset everything. Deallocates memory and pretends it never existed. The allocator is not changed by this call and does not need to be re-applied.
Reimplemented from lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize >.
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::ResetNoDealloc | ( | ) | [inline] |
Resets the string without deallocating memory. This is the fastest way to clear the string. This cannot cause a memory leak; the existing allocated area will be used for future string operations.
Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Set | ( | const CStringBase< _tDerived, _tDataType, _uAllocSize > & | _sbString | ) | [inline] |
Set the string value from another string object. Returns false if the set failed (due to memory).
_sbString | The string to which to set this string. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Set | ( | const _tDataType * | _pdtValue | ) | [inline] |
Set the string value. The given string must be NULL-terminated. Returns false if the set failed (due to memory).
_pdtValue | Pointer to the NULL-terminated characters to which to set this string. |
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Set | ( | const _tDataType * | _pdtValue, |
LSUINT32 | _ui32Len | ||
) | [inline] |
Set the string value. The new value may contain any characters, including NULL characters. The new string is always NULL-terminated. Returns false if the set failed (due to memory).
_pdtValue | Pointer to the characters to which to set this string. |
_ui32Len | The number of characters to which _pdtValue points. |
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::SetAllocator | ( | CAllocator * | _paAllocator | ) | [inline] |
Set the allocator. Calls Reset() internally, so the string must not contain any useful content.
_paAllocator | Pointer to the new allocator to be used by this object. Can be NULL. |
Reimplemented from lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize >.
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Snap | ( | ) | [inline] |
Snap the amount of allocated data to fit the string exactly. When creating strings, extra bytes are normally allocated so that appending operations will be faster. Additionally, extra bytes may be trailing after removing characters. Use this to free unused memory.
Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::StrLen | ( | const _tDataType * | _pdtValue | ) | const [inline, protected] |
Override this for improved performance. char arrays can use a much faster algorithm for determining string length.
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Trash | ( | ) | [inline] |
Trash the string. Resets the string entirely without deallocating any memory. This must be used only in conjunction with trashable heaps.
Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.