"L. Spiro Engine"
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

lstl::CStringBase< _tDerived, _tDataType, _uAllocSize > Class Template Reference

#include <LSTLStringBase.h>

Inheritance diagram for lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >:
lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize > lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize > lstl::CVectorBase

List of all members.

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

Detailed Description

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
class lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >

Class CStringBase

Description: The base of strings.


Member Typedef Documentation

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
typedef struct lstl::CStringBase::LSSTD_RANGE * lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::LPLSSTD_RANGE

A range of characters.


Member Function Documentation

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::AllocateAtLeast ( LSUINT32  _ui32Total) [inline]

Allocate the given number of characters.

Parameters:
_ui32TotalThe new total number of values to allocate.
Returns:
Returns false if there is not enough memory to allocate the requested amount.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_dtValueThe character to append.
Returns:
Returns false if there is a memory failure preventing the append operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_pdtValuePointer to the characters to append to this string.
_ui32LenNumber of characters to append to this string.
Returns:
Returns false if there is a memory failure preventing the append operation.

Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_pdtValuePointer to the NULL-terminated characters to append to this string.
Returns:
Returns false if there is a memory failure preventing the append operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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).

Parameters:
_sbStringThe string object to append to this string.
Returns:
Returns false if there is a memory failure preventing the append operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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().

Parameters:
_sbStringThe string against which to compare this string.
Returns:
Returns the lexicographic relationship between the strings.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32StartThe location from where to search, inclusive.
_sbStringThe wildcard string to locate within this string object.
_ui32MaxWildcardLenThe wildcard string to locate within this string object.
Returns:
Returns the length of the match if there is one or 0.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
const _tDataType* LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::CStr ( ) const [inline]

Get the C-string pointer. For read only!

Returns:
Returns a pointer to the string data in this object that can be used in regular string functions.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
static _tDataType LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::DecodeEscape ( const _tDataType *  _pdtValue,
LSUINT32  _ui32Len,
LSUINT32 &  _ui32Size 
) [inline, static]

Decode a single escape sequence.

Parameters:
_pdtValuePointer to the escape sequence to decode.
_ui32LenNumber of characters in the sequence to which _pdtValue points.
_ui32SizeUpon return this holds the number of characters consumed by the escape sequence.
Returns:
Returns the value of the escape sequence.

The actual character to find.

The character to write to the string.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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)

Returns:
Returns the converted string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Equals ( const CStringBase< _tDerived, _tDataType, _uAllocSize > &  _sbString) const [inline]

Cmp() is not the best (or fastest) way to determine equality of strings strictly. Use Equals() for this, which simply returns true or false.

Parameters:
_sbStringThe string against which to compare this string.
Returns:
Returns true if the strings are an exact match, false otherwise.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::FindAndReplaceChar ( _tDataType  _tReplaceMe,
_tDataType  _tWithMe 
) [inline]

Finds and replaces all occurrences of the given character.

Parameters:
_tReplaceMeThe character to find.
_tWithMeThe character to which to replace the found character.
Returns:
Returns the number of characters replaced.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_sbReplaceMeThe string to replace within this string. String is in wildcard format.
_sbWithMeThe string with which to replace matches of _sbReplaceMe within this string.
_bWholeWordsIf true, only whole words are replaced.
Returns:
Returns the number of replacements made.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32StartThe location from where to search, inclusive.
_sbStringThe string to locate within this string object.
Returns:
Returns the range of the located string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32StartThe location from where to search, inclusive.
_sbStringThe string to locate within this string object.
Returns:
Returns the range of the located string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32StartThe location from where to search, inclusive.
_sbStringThe string to locate within this string object.
Returns:
Returns the range of the located string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
CAllocator* LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::GetAllocator ( ) [inline]

Get the allocator used by this object.

Returns:
Returns a pointer to the allocator used by this object, which may be NULL.

Reimplemented from lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
_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.

Returns:
Returns the last character in the string or 0 if the string is empty.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
CStringBase<_tDerived, _tDataType, _uAllocSize> LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::GetToken ( _tDataType  _tDelimiter,
LSUINT32  _ui32Index 
) const [inline]

Get a token from this string.

Parameters:
_tDelimiterThe token delimiter
_ui32IndexIndex of the token to get.
Returns:
Returns a new string containing the result. If no such token exists, an empty string is returned.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_sbStringThe string against which to compare this string.
Returns:
Returns the lexicographic relationship between the strings.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32LocIndex from which to begin testing characters within this string.
_sbStringThe string against which to compare this string.
Returns:
Returns the lexicographic relationship between the strings.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32PosPosition at which to insert the characters.
_pdtValuePointer to the characters to insert into this string. which must be NULL-terminated.
Returns:
Returns false if there is a memory failure preventing the insert operation or if the insert position is beyond the length of the string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Insert ( LSUINT32  _ui32Pos,
_tDataType  _dtValue 
) [inline]

Insert a single character at a given position.

Parameters:
_ui32PosPosition at which to insert the character.
_dtValueThe value to insert into this string.
Returns:
Returns false if there is a memory failure preventing the insert operation or if the insert position is beyond the length of the string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32PosPosition at which to insert the characters.
_pdtValuePointer to the characters to insert into this string.
_ui32LenThe number of characters to which _pdtValue points.
Returns:
Returns false if there is a memory failure preventing the insert operation or if the insert position is beyond the length of the string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_rRangeThe range to check.
Returns:
Returns true if the given range specifies a whole word or false otherwise.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSUINT32 LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::Length ( ) const [inline]

Get the length of the string.

Returns:
Returns the length of the string in characters.

Reimplemented from lstl::CSVectorCrtp< CVectorPoD< _tDataType, LSUINT32, _uAllocSize >, _tDataType, LSUINT32, _uAllocSize >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator!= ( const CStringBase< _tDerived, _tDataType, _uAllocSize > &  _sbString) const [inline]

Do we not equal another string?

Parameters:
_sbStringThe string against which this string is to be compared for a match.
Returns:
Returns true if the given string does not matche this string exactly, false otherwise.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator!= ( const _tDataType *  _pdtValue) const [inline]

Do we not equal another NULL-terminated character array?

Parameters:
_pdtValueThe character array against which this string is to be compared for a match.
Returns:
Returns true if the given character array does not matche this string exactly, false otherwise.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_pdtValueThe character array to append.
Returns:
Returns a new string representing the concatenation of this string and the given NULL-terminated string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_dtValueThe character to append.
Returns:
Returns a new string representing the concatenation of this string and the given character.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_sbStringThe string to append.
Returns:
Returns a new string representing the concatenation of this string and the given string.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_pdtValueThe NULL-terminated character array to append to this string.
Returns:
Returns this string with the given character array appended.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_dtValueThe character to append to this string.
Returns:
Returns this string with the given character appended.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_sbStringThe string to append to this string.
Returns:
Returns this string with the given string appended.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_sbStringThe string against which we are to be compared.
Returns:
Returns true if this string object is less than the given string object when compared lexicographically.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator== ( const CStringBase< _tDerived, _tDataType, _uAllocSize > &  _sbString) const [inline]

Do we equal another string?

Parameters:
_sbStringThe string against which this string is to be compared for a match.
Returns:
Returns true if the given string matches this string exactly, false otherwise.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::operator== ( const _tDataType *  _pdtValue) const [inline]

Do we equal another NULL-terminated character array?

Parameters:
_pdtValueThe character array against which this string is to be compared for a match.
Returns:
Returns true if the given character array matches this string exactly, false otherwise.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_sbStringThe string against which we are to be compared.
Returns:
Returns true if this string object is greater than the given string object when compared lexicographically.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32IndexThe index of the character to remove.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_ui32IndexThe starting index of the characters to be removed.
_ui32TotalThe total number of characters to remove.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSBOOL LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemLastChar ( ) [inline]

Remove the last character from the string, if there is one.

Returns:
Returns true if a character was removed.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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().

Returns:
Returns this string object.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
LSVOID LSE_CALL lstl::CStringBase< _tDerived, _tDataType, _uAllocSize >::RemRange ( const LSSTD_RANGE _rRange) [inline]

Remove a range of characters.

Parameters:
_rRangeRange of characters to remove.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_rRangeRange of characters to replace with the given set of characters.
_pdtValuePointer to the characters to replace in this string.
_ui32LenThe number of characters to which _pdtValue points.
Returns:
Returns false if there is a memory failure preventing the replace operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_rRangeRange of characters to replace with the given set of characters.
_pdtValuePointer to the NULL-terminated characters to which to replace the range of characters in this string.
Returns:
Returns false if there is a memory failure preventing the replace operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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 >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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 >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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).

Parameters:
_sbStringThe string to which to set this string.
Returns:
Returns false if there is a memory failure preventing the copy operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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).

Parameters:
_pdtValuePointer to the NULL-terminated characters to which to set this string.
Returns:
Returns false if there is a memory failure preventing the copy operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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).

Parameters:
_pdtValuePointer to the characters to which to set this string.
_ui32LenThe number of characters to which _pdtValue points.
Returns:
Returns false if there is a memory failure preventing the copy operation.
template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

Parameters:
_paAllocatorPointer to the new allocator to be used by this object. Can be NULL.

Reimplemented from lstl::CVectorPoD< _tDataType, LSUINT32, _uAllocSize >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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 >.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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.

template<typename _tDerived, typename _tDataType, unsigned _uAllocSize = 32>
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 >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator