A class representing an ASCII string. More...
#include <sstringw.h>
Public Types | |
| typedef const wchar_t * | pctstr |
| typedef wchar_t | _tchar |
| typedef wchar_traits | _tchar_traits |
Public Member Functions | |
| SStringW () | |
| Default constructor. | |
| SStringW (const SStringW &stringSrc) | |
| Copy constructor. | |
| SStringW (const IStringW *stringSrc) | |
| Constructor from an IStringW object. | |
| SStringW (wchar_t ch, int nLength=1) | |
| Constructor from a single character. | |
| SStringW (const wchar_t *psz, int nLength) | |
| Constructor from a substring of a character array. | |
| SStringW (const wchar_t *psz) | |
| Constructor from a character array. | |
| ~SStringW () | |
| Destructor. | |
| int | GetLength () SCONST |
| Retrieves the length of the string. | |
| BOOL | IsEmpty () SCONST |
| Checks if the string is empty. | |
| void | Empty () |
| Empties the string. | |
| wchar_t | GetAt (int nIndex) SCONST |
| Retrieves the character at a specified index. | |
| void | SetAt (int nIndex, wchar_t ch) |
| Sets the character at a specified index. | |
| const wchar_t * | c_str () SCONST |
| Retrieves a C-style string representation of the string. | |
| int | Compare (const wchar_t *psz) SCONST |
| Compares the string with another string. | |
| int | CompareNoCase (const wchar_t *psz) SCONST |
| Compares the string with another string, ignoring case. | |
| void | TrimBlank () |
| Trims leading and trailing whitespace characters from the string. | |
| int | InsertChar (int nIndex, wchar_t ch) |
| Inserts a character at a specified index. | |
| int | Insert (int nIndex, const wchar_t *psz) |
| Inserts a substring at a specified index. | |
| int | Delete (int nIndex, int nCount=1) |
| Deletes a substring from the string. | |
| int | ReplaceChar (wchar_t chOld, wchar_t chNew) |
| Replaces all occurrences of a character with another character. | |
| int | Replace (const wchar_t *pszOld, const wchar_t *pszNew) |
| Replaces all occurrences of a substring with another substring. | |
| int | Remove (wchar_t chRemove) |
| Removes all occurrences of a character from the string. | |
| int | FindChar (wchar_t ch, int nStart=0) SCONST |
| Finds the first occurrence of a character in the string. | |
| int | ReverseFind (wchar_t ch) SCONST |
| Finds the last occurrence of a character in the string. | |
| int | Find (const wchar_t *pszSub, int nStart=0) SCONST |
| Finds the first occurrence of a substring in the string. | |
| wchar_t * | GetBuffer (int nMinBufLength=-1) |
| Retrieves a modifiable buffer for the string. | |
| void | ReleaseBuffer (int nNewLength=-1) |
| Releases the buffer and sets the new length of the string. | |
| wchar_t * | GetBufferSetLength (int nNewLength) |
| Retrieves a modifiable buffer for the string and sets the new length. | |
| void | SetLength (int nLength) |
| Sets the length of the string. | |
| void | Copy (const IStringW *src) |
| Copies the contents of another string into this string. | |
| void | Assign (LPCWSTR src) |
| Assigns a character array to the string. | |
| void | Assign2 (LPCWSTR src, int nLen) |
| Assigns a substring of a character array to the string. | |
| LPVOID | GetPrivData () SCONST |
| Retrieves private data associated with the string. | |
| void | ToUpper () OVERRIDE |
| Converts the string to uppercase. | |
| void | ToLower () OVERRIDE |
| Converts the string to lowercase. | |
| void | TrimRight (wchar_t chTarget=VK_SPACE) OVERRIDE |
| Trims trailing whitespace characters from the string. | |
| void | TrimLeft (wchar_t chTarget=VK_SPACE) OVERRIDE |
| Trims leading whitespace characters from the string. | |
| void | Trim (wchar_t chTarget=VK_SPACE) OVERRIDE |
| Trims leading and trailing whitespace characters from the string. | |
| void | AppendChar (wchar_t ch) OVERRIDE |
| Appends a character to the string. | |
| void | AppendStr (const wchar_t *pszStr, int nLen=-1) OVERRIDE |
| Appends a substring to the string. | |
| void | Release () OVERRIDE |
| Releases the string and its resources. | |
| UINT | ToUint () SCONST OVERRIDE |
| Converts the string to an unsigned integer. | |
| long | ToLong () SCONST OVERRIDE |
| Converts the string to a long integer. | |
| int | ToInt () SCONST OVERRIDE |
| Converts the string to an integer. | |
| float | ToFloat () SCONST OVERRIDE |
| Converts the string to a float. | |
| double | ToDouble () SCONST OVERRIDE |
| Converts the string to a double. | |
| BOOL | ToBool () SCONST OVERRIDE |
| Converts the string to a boolean. | |
| SStringW | Mid (int nFirst) const |
| Extracts a substring from the string. | |
| SStringW | Mid (int nFirst, int nCount) const |
| Extracts a substring from the string. | |
| SStringW | Right (int nCount) const |
| Extracts the rightmost part of the string. | |
| SStringW | Left (int nCount) const |
| Extracts the leftmost part of the string. | |
| SStringW & | MakeUpper () |
| Converts the string to uppercase. | |
| SStringW & | MakeLower () |
| Converts the string to lowercase. | |
| bool | StartsWith (const SStringW &prefix, bool IgnoreCase=false) const |
| Checks if the string starts with a specified prefix. | |
| bool | EndsWith (const SStringW &suffix, bool IgnoreCase=false) const |
| Checks if the string ends with a specified suffix. | |
| BOOL | LoadString (UINT nID, HINSTANCE hInst) |
| Loads a string resource from a module. | |
| BOOL __cdecl | Format (HINSTANCE hInst, UINT nFormatID,...) |
| Formats a string using a format string and variable arguments. | |
| void __cdecl | AppendFormat (HINSTANCE hInst, UINT nFormatID,...) |
| Appends formatted data to the string using a format string and variable arguments. | |
| SStringW __cdecl | Format (const wchar_t *pszFormat,...) |
| Formats a string using a format string and variable arguments. | |
| SStringW __cdecl | AppendFormat (const wchar_t *pszFormat,...) |
| Appends formatted data to the string using a format string and variable arguments. | |
| operator const wchar_t * () const | |
| Converts the string to a C-style string. | |
| wchar_t | operator[] (int nIndex) const |
| Retrieves the character at a specified index. | |
| SStringW & | operator= (const SStringW &stringSrc) |
| Overloaded assignment operator from another SStringW object. | |
| SStringW & | operator= (const wchar_t *psz) |
| Overloaded assignment operator from a character array. | |
| const SStringW & | operator= (wchar_t ch) |
| Overloaded assignment operator from a single character. | |
| const SStringW & | operator+= (const wchar_t *psz) |
| Overloaded concatenation operator with a character array. | |
| const SStringW & | operator+= (wchar_t ch) |
| Overloaded concatenation operator with a single character. | |
| const SStringW & | operator+= (const SStringW &src) |
| Overloaded concatenation operator with another SStringW object. | |
| SStringW & | Append (const SStringW &src) |
| Appends another SStringW object to the string. | |
Static Public Member Functions | |
| static bool | IsBlankChar (const wchar_t &c) |
| Checks if a character is a blank character. | |
Protected Member Functions | |
| int | GetAllocLength () const |
| Retrieves the allocated length of the string buffer. | |
| void | Preallocate (int nLength) |
| Preallocates memory for the string buffer. | |
| void | FreeExtra () |
| Frees any extra allocated memory in the string buffer. | |
| TStringData * | GetData () const |
| Retrieves the data structure of the string. | |
| void | Init () |
| Initializes the string. | |
| void | InitFromIString (const IStringW *stringSrc) |
| Initializes the string from an IStringW object. | |
| BOOL | _Format (const wchar_t *pszFormat, va_list &args) |
| Formats a string using a format string and variable arguments. | |
| void | _AppendFormat (const wchar_t *pszFormat, va_list &args) |
| Appends formatted data to the string using a format string and variable arguments. | |
| void | AllocCopy (SStringW &dest, int nCopyLen, int nCopyIndex, int nExtraLen) const |
| Allocates and copies a substring of the string. | |
| void | AssignCopy (int nSrcLen, const wchar_t *pszSrcData) |
| Assigns a substring of a character array to the string. | |
| bool | ConcatCopy (int nSrc1Len, const wchar_t *pszSrc1Data, int nSrc2Len, const wchar_t *pszSrc2Data) |
| Concatenates two substrings and copies the result to the string. | |
| void | ConcatInPlace (int nSrcLen, const wchar_t *pszSrcData) |
| Concatenates a substring to the string in place. | |
| void | CopyBeforeWrite () |
| Copies the string before writing to it. | |
| bool | AllocBeforeWrite (int nLen) |
| Allocates memory for the string before writing to it. | |
| bool | AllocBuffer (int nLength) |
| Allocates memory for the string buffer. | |
| bool | ReallocBuffer (int nNewLength) |
| Reallocates memory for the string buffer. | |
| void | _ReleaseData () |
| Releases the data structure of the string. | |
Static Protected Member Functions | |
| static int | SafeStrlen (const wchar_t *psz) |
| Computes the length of a null-terminated string safely. | |
| static TStringData * | AllocData (int nLength, TStringData *pOldData=NULL) |
| Allocates a new data structure for the string. | |
| static void | ReleaseData (TStringData *pData) |
| Releases a data structure. | |
Protected Attributes | |
| wchar_t * | m_pszData |
| Pointer to the ref counted string data. | |
Friends | |
| bool __stdcall | operator== (const SStringW &s1, const SStringW &s2) |
| Overloaded equality operator between two SStringW objects. | |
| bool __stdcall | operator== (const SStringW &s1, const wchar_t *s2) |
| Overloaded equality operator between an SStringW object and a character array. | |
| bool __stdcall | operator== (const wchar_t *s1, const SStringW &s2) |
| Overloaded equality operator between a character array and an SStringW object. | |
| bool __stdcall | operator!= (const SStringW &s1, const SStringW &s2) |
| Overloaded inequality operator between two SStringW objects. | |
| bool __stdcall | operator!= (const SStringW &s1, const wchar_t *s2) |
| Overloaded inequality operator between an SStringW object and a character array. | |
| bool __stdcall | operator!= (const wchar_t *s1, const SStringW &s2) |
| Overloaded inequality operator between a character array and an SStringW object. | |
| bool __stdcall | operator< (const SStringW &s1, const SStringW &s2) |
| Overloaded less-than operator between two SStringW objects. | |
| bool __stdcall | operator< (const SStringW &s1, const wchar_t *s2) |
| Overloaded less-than operator between an SStringW object and a character array. | |
| bool __stdcall | operator< (const wchar_t *s1, const SStringW &s2) |
| Overloaded less-than operator between a character array and an SStringW object. | |
| bool __stdcall | operator> (const SStringW &s1, const SStringW &s2) |
| Overloaded greater-than operator between two SStringW objects. | |
| bool __stdcall | operator> (const SStringW &s1, const wchar_t *s2) |
| Overloaded greater-than operator between an SStringW object and a character array. | |
| bool __stdcall | operator> (const wchar_t *s1, const SStringW &s2) |
| Overloaded greater-than operator between a character array and an SStringW object. | |
| bool __stdcall | operator<= (const SStringW &s1, const SStringW &s2) |
| Overloaded less-than-or-equal-to operator between two SStringW objects. | |
| bool __stdcall | operator<= (const SStringW &s1, const wchar_t *s2) |
| Overloaded less-than-or-equal-to operator between an SStringW object and a character array. | |
| bool __stdcall | operator<= (const wchar_t *s1, const SStringW &s2) |
| Overloaded less-than-or-equal-to operator between a character array and an SStringW object. | |
| bool __stdcall | operator>= (const SStringW &s1, const SStringW &s2) |
| Overloaded greater-than-or-equal-to operator between two SStringW objects. | |
| bool __stdcall | operator>= (const SStringW &s1, const wchar_t *s2) |
| Overloaded greater-than-or-equal-to operator between an SStringW object and a character array. | |
| bool __stdcall | operator>= (const wchar_t *s1, const SStringW &s2) |
| Overloaded greater-than-or-equal-to operator between a character array and an SStringW object. | |
| SStringW __stdcall | operator+ (const SStringW &string1, const SStringW &string2) |
| Overloaded addition operator between two SStringW objects. | |
| SStringW __stdcall | operator+ (const SStringW &string, const wchar_t *psz) |
| Overloaded addition operator between an SStringW object and a character array. | |
| SStringW __stdcall | operator+ (const wchar_t *psz, const SStringW &string) |
| Overloaded addition operator between a character array and an SStringW object. | |
| SStringW __stdcall | operator+ (const SStringW &string1, wchar_t ch) |
| Overloaded addition operator between an SStringW object and a single character. | |
| SStringW __stdcall | operator+ (wchar_t ch, const SStringW &string) |
| Overloaded addition operator between a single character and an SStringW object. | |
A class representing an ASCII string.
Definition at line 95 of file sstringw.h.
| typedef wchar_t SStringW::_tchar |
Definition at line 99 of file sstringw.h.
| typedef wchar_traits SStringW::_tchar_traits |
Definition at line 100 of file sstringw.h.
| typedef const wchar_t* SStringW::pctstr |
Definition at line 98 of file sstringw.h.
| SStringW::SStringW | ( | ) |
Default constructor.
Definition at line 1181 of file sstringw.cpp.
| SStringW::SStringW | ( | const SStringW & | stringSrc | ) |
Copy constructor.
| stringSrc | The string to copy. |
Definition at line 1176 of file sstringw.cpp.
| SStringW::SStringW | ( | const IStringW * | stringSrc | ) |
Constructor from an IStringW object.
| stringSrc | The string to copy. |
Definition at line 1171 of file sstringw.cpp.
| SStringW::SStringW | ( | wchar_t | ch, |
| int | nLength = 1 ) |
Constructor from a single character.
| ch | The character to initialize the string with. |
| nLength | The number of times to repeat the character. |
Definition at line 1140 of file sstringw.cpp.
| SStringW::SStringW | ( | const wchar_t * | psz, |
| int | nLength ) |
Constructor from a substring of a character array.
| psz | The character array. |
| nLength | The length of the substring. |
Definition at line 1129 of file sstringw.cpp.
| SStringW::SStringW | ( | const wchar_t * | psz | ) |
Constructor from a character array.
| psz | The character array. |
Definition at line 1118 of file sstringw.cpp.
| SStringW::~SStringW | ( | ) |
Destructor.
Definition at line 1110 of file sstringw.cpp.
|
protected |
Appends formatted data to the string using a format string and variable arguments.
| pszFormat | The format string. |
| args | The variable arguments list. |
Definition at line 324 of file sstringw.cpp.
|
protected |
Formats a string using a format string and variable arguments.
| pszFormat | The format string. |
| args | The variable arguments list. |
Definition at line 338 of file sstringw.cpp.
|
protected |
Releases the data structure of the string.
Definition at line 169 of file sstringw.cpp.
|
protected |
Allocates memory for the string before writing to it.
| nLen | The length to allocate. |
Definition at line 221 of file sstringw.cpp.
|
protected |
Allocates memory for the string buffer.
| nLength | The length to allocate. |
Definition at line 210 of file sstringw.cpp.
|
protected |
Allocates and copies a substring of the string.
| dest | The destination string. |
| nCopyLen | The length of the substring to copy. |
| nCopyIndex | The starting index of the substring. |
| nExtraLen | The extra length to allocate. |
Definition at line 305 of file sstringw.cpp.
|
staticprotected |
Allocates a new data structure for the string.
| nLength | The length to allocate. |
| pOldData | The old data structure to reuse (optional). |
Definition at line 142 of file sstringw.cpp.
Appends another SStringW object to the string.
| src | The string to append. |
Definition at line 939 of file sstringw.cpp.
| void SStringW::AppendChar | ( | wchar_t | ch | ) |
Appends a character to the string.
| ch | The character to append. |
Definition at line 952 of file sstringw.cpp.
| SStringW __cdecl SStringW::AppendFormat | ( | const wchar_t * | pszFormat, |
| ... ) |
Appends formatted data to the string using a format string and variable arguments.
| pszFormat | The format string. |
| ... | The variable arguments list. |
Definition at line 460 of file sstringw.cpp.
| void __cdecl SStringW::AppendFormat | ( | HINSTANCE | hInst, |
| UINT | nFormatID, | ||
| ... ) |
Appends formatted data to the string using a format string and variable arguments.
| hInst | The handle to the module. |
| nFormatID | The resource identifier of the format string. |
| ... | The variable arguments list. |
Definition at line 469 of file sstringw.cpp.
| void SStringW::AppendStr | ( | const wchar_t * | pszStr, |
| int | nLen = -1 ) |
Appends a substring to the string.
| pszStr | The substring to append. |
| nLen | The length of the substring. |
Definition at line 946 of file sstringw.cpp.
| void SStringW::Assign | ( | LPCWSTR | src | ) |
Assigns a character array to the string.
| src | The character array to assign. |
Definition at line 1093 of file sstringw.cpp.
| void SStringW::Assign2 | ( | LPCWSTR | src, |
| int | nLen ) |
Assigns a substring of a character array to the string.
| src | The character array to assign. |
| nLen | The length of the substring. |
Definition at line 1098 of file sstringw.cpp.
|
protected |
Assigns a substring of a character array to the string.
| nSrcLen | The length of the substring. |
| pszSrcData | The character array to assign from. |
Definition at line 295 of file sstringw.cpp.
| const wchar_t * SStringW::c_str | ( | ) |
Retrieves a C-style string representation of the string.
Definition at line 1007 of file sstringw.cpp.
| int SStringW::Compare | ( | const wchar_t * | psz | ) |
Compares the string with another string.
| psz | The string to compare with. |
Definition at line 934 of file sstringw.cpp.
| int SStringW::CompareNoCase | ( | const wchar_t * | psz | ) |
Compares the string with another string, ignoring case.
| psz | The string to compare with. |
Definition at line 929 of file sstringw.cpp.
|
protected |
Concatenates two substrings and copies the result to the string.
| nSrc1Len | The length of the first substring. |
| pszSrc1Data | The first substring. |
| nSrc2Len | The length of the second substring. |
| pszSrc2Data | The second substring. |
Definition at line 275 of file sstringw.cpp.
|
protected |
Concatenates a substring to the string in place.
| nSrcLen | The length of the substring. |
| pszSrcData | The substring to concatenate. |
Definition at line 246 of file sstringw.cpp.
| void SStringW::Copy | ( | const IStringW * | src | ) |
Copies the contents of another string into this string.
| src | The string to copy from. |
Definition at line 1069 of file sstringw.cpp.
|
protected |
Copies the string before writing to it.
Definition at line 234 of file sstringw.cpp.
| int SStringW::Delete | ( | int | nIndex, |
| int | nCount = 1 ) |
Deletes a substring from the string.
| nIndex | The index at which to start deletion. |
| nCount | The number of characters to delete. |
Definition at line 662 of file sstringw.cpp.
| void SStringW::Empty | ( | ) |
Empties the string.
Definition at line 1041 of file sstringw.cpp.
| bool SStringW::EndsWith | ( | const SStringW & | suffix, |
| bool | IgnoreCase = false ) const |
Checks if the string ends with a specified suffix.
| suffix | The suffix to check. |
| IgnoreCase | Whether the comparison should be case-insensitive. |
Definition at line 736 of file sstringw.cpp.
| int SStringW::Find | ( | const wchar_t * | pszSub, |
| int | nStart = 0 ) |
Finds the first occurrence of a substring in the string.
| pszSub | The substring to find. |
| nStart | The index at which to start the search. |
Definition at line 516 of file sstringw.cpp.
| int SStringW::FindChar | ( | wchar_t | ch, |
| int | nStart = 0 ) |
Finds the first occurrence of a character in the string.
| ch | The character to find. |
| nStart | The index at which to start the search. |
Definition at line 529 of file sstringw.cpp.
| SStringW __cdecl SStringW::Format | ( | const wchar_t * | pszFormat, |
| ... ) |
Formats a string using a format string and variable arguments.
| pszFormat | The format string. |
| ... | The variable arguments list. |
Definition at line 481 of file sstringw.cpp.
| BOOL __cdecl SStringW::Format | ( | HINSTANCE | hInst, |
| UINT | nFormatID, | ||
| ... ) |
Formats a string using a format string and variable arguments.
| hInst | The handle to the module. |
| nFormatID | The resource identifier of the format string. |
| ... | The variable arguments list. |
Definition at line 490 of file sstringw.cpp.
|
protected |
Frees any extra allocated memory in the string buffer.
Definition at line 383 of file sstringw.cpp.
|
protected |
Retrieves the allocated length of the string buffer.
Definition at line 377 of file sstringw.cpp.
| wchar_t SStringW::GetAt | ( | int | nIndex | ) |
Retrieves the character at a specified index.
| nIndex | The index of the character. |
Definition at line 1034 of file sstringw.cpp.
| wchar_t * SStringW::GetBuffer | ( | int | nMinBufLength = -1 | ) |
Retrieves a modifiable buffer for the string.
| nMinBufLength | The minimum buffer length. |
Definition at line 439 of file sstringw.cpp.
| wchar_t * SStringW::GetBufferSetLength | ( | int | nNewLength | ) |
Retrieves a modifiable buffer for the string and sets the new length.
| nNewLength | The new length of the string. |
Definition at line 414 of file sstringw.cpp.
|
protected |
Retrieves the data structure of the string.
Definition at line 366 of file sstringw.cpp.
| int SStringW::GetLength | ( | ) |
Retrieves the length of the string.
Definition at line 1064 of file sstringw.cpp.
| LPVOID SStringW::GetPrivData | ( | ) |
Retrieves private data associated with the string.
Definition at line 1103 of file sstringw.cpp.
|
protected |
Initializes the string.
Definition at line 361 of file sstringw.cpp.
|
protected |
Initializes the string from an IStringW object.
| stringSrc | The IStringW object to initialize from. |
Definition at line 1154 of file sstringw.cpp.
| int SStringW::Insert | ( | int | nIndex, |
| const wchar_t * | psz ) |
Inserts a substring at a specified index.
| nIndex | The index at which to insert the substring. |
| psz | The substring to insert. |
Definition at line 683 of file sstringw.cpp.
| int SStringW::InsertChar | ( | int | nIndex, |
| wchar_t | ch ) |
Inserts a character at a specified index.
| nIndex | The index at which to insert the character. |
| ch | The character to insert. |
Definition at line 711 of file sstringw.cpp.
|
static |
Checks if a character is a blank character.
| c | The character to check. |
Definition at line 788 of file sstringw.cpp.
| BOOL SStringW::IsEmpty | ( | ) |
Checks if the string is empty.
Definition at line 1059 of file sstringw.cpp.
| SStringW SStringW::Left | ( | int | nCount | ) | const |
Extracts the leftmost part of the string.
| nCount | The length of the substring. |
Definition at line 879 of file sstringw.cpp.
| BOOL SStringW::LoadString | ( | UINT | nID, |
| HINSTANCE | hInst ) |
Loads a string resource from a module.
| nID | The resource identifier. |
| hInst | The handle to the module. |
Definition at line 506 of file sstringw.cpp.
| SStringW & SStringW::MakeLower | ( | ) |
Converts the string to lowercase.
Definition at line 869 of file sstringw.cpp.
| SStringW & SStringW::MakeUpper | ( | ) |
Converts the string to uppercase.
Definition at line 874 of file sstringw.cpp.
| SStringW SStringW::Mid | ( | int | nFirst | ) | const |
Extracts a substring from the string.
| nFirst | The starting index of the substring. |
Definition at line 924 of file sstringw.cpp.
| SStringW SStringW::Mid | ( | int | nFirst, |
| int | nCount ) const |
Extracts a substring from the string.
| nFirst | The starting index of the substring. |
| nCount | The length of the substring. |
Definition at line 905 of file sstringw.cpp.
| SStringW::operator const wchar_t * | ( | ) | const |
Converts the string to a C-style string.
Definition at line 1012 of file sstringw.cpp.
Overloaded concatenation operator with another SStringW object.
| src | The string to concatenate. |
Definition at line 957 of file sstringw.cpp.
| const SStringW & SStringW::operator+= | ( | const wchar_t * | psz | ) |
Overloaded concatenation operator with a character array.
| psz | The character array to concatenate. |
Definition at line 967 of file sstringw.cpp.
| const SStringW & SStringW::operator+= | ( | wchar_t | ch | ) |
Overloaded concatenation operator with a single character.
| ch | The character to concatenate. |
Definition at line 962 of file sstringw.cpp.
Overloaded assignment operator from another SStringW object.
| stringSrc | The string to assign. |
Definition at line 985 of file sstringw.cpp.
| SStringW & SStringW::operator= | ( | const wchar_t * | psz | ) |
Overloaded assignment operator from a character array.
| psz | The character array to assign. |
Definition at line 978 of file sstringw.cpp.
| const SStringW & SStringW::operator= | ( | wchar_t | ch | ) |
Overloaded assignment operator from a single character.
| ch | The character to assign. |
Definition at line 972 of file sstringw.cpp.
| wchar_t SStringW::operator[] | ( | int | nIndex | ) | const |
Retrieves the character at a specified index.
| nIndex | The index of the character. |
Definition at line 1026 of file sstringw.cpp.
|
protected |
Preallocates memory for the string buffer.
| nLength | The length to preallocate. |
Definition at line 395 of file sstringw.cpp.
|
protected |
Reallocates memory for the string buffer.
| nNewLength | The new length to allocate. |
Definition at line 180 of file sstringw.cpp.
| void SStringW::Release | ( | ) |
Releases the string and its resources.
Definition at line 1186 of file sstringw.cpp.
| void SStringW::ReleaseBuffer | ( | int | nNewLength = -1 | ) |
Releases the buffer and sets the new length of the string.
| nNewLength | The new length of the string. |
Definition at line 426 of file sstringw.cpp.
|
staticprotected |
Releases a data structure.
| pData | The data structure to release. |
Definition at line 133 of file sstringw.cpp.
| int SStringW::Remove | ( | wchar_t | chRemove | ) |
Removes all occurrences of a character from the string.
| chRemove | The character to remove. |
Definition at line 551 of file sstringw.cpp.
| int SStringW::Replace | ( | const wchar_t * | pszOld, |
| const wchar_t * | pszNew ) |
Replaces all occurrences of a substring with another substring.
| pszOld | The substring to replace. |
| pszNew | The substring to replace with. |
Definition at line 575 of file sstringw.cpp.
| int SStringW::ReplaceChar | ( | wchar_t | chOld, |
| wchar_t | chNew ) |
Replaces all occurrences of a character with another character.
| chOld | The character to replace. |
| chNew | The character to replace with. |
Definition at line 636 of file sstringw.cpp.
| int SStringW::ReverseFind | ( | wchar_t | ch | ) |
Finds the last occurrence of a character in the string.
| ch | The character to find. |
Definition at line 542 of file sstringw.cpp.
| SStringW SStringW::Right | ( | int | nCount | ) | const |
Extracts the rightmost part of the string.
| nCount | The length of the substring. |
Definition at line 892 of file sstringw.cpp.
|
staticprotected |
Computes the length of a null-terminated string safely.
| psz | The string to measure. |
Definition at line 372 of file sstringw.cpp.
| void SStringW::SetAt | ( | int | nIndex, |
| wchar_t | ch ) |
Sets the character at a specified index.
| nIndex | The index of the character. |
| ch | The new character value. |
Definition at line 1017 of file sstringw.cpp.
| void SStringW::SetLength | ( | int | nLength | ) |
Sets the length of the string.
| nLength | The new length of the string. |
Definition at line 402 of file sstringw.cpp.
| bool SStringW::StartsWith | ( | const SStringW & | prefix, |
| bool | IgnoreCase = false ) const |
Checks if the string starts with a specified prefix.
| prefix | The prefix to check. |
| IgnoreCase | Whether the comparison should be case-insensitive. |
Definition at line 749 of file sstringw.cpp.
| BOOL SStringW::ToBool | ( | ) |
Converts the string to a boolean.
Definition at line 1214 of file sstringw.cpp.
| double SStringW::ToDouble | ( | ) |
Converts the string to a double.
Definition at line 1210 of file sstringw.cpp.
| float SStringW::ToFloat | ( | ) |
Converts the string to a float.
Definition at line 1206 of file sstringw.cpp.
| int SStringW::ToInt | ( | ) |
Converts the string to an integer.
Definition at line 1202 of file sstringw.cpp.
| long SStringW::ToLong | ( | ) |
Converts the string to a long integer.
Definition at line 1197 of file sstringw.cpp.
| void SStringW::ToLower | ( | ) |
Converts the string to lowercase.
Definition at line 853 of file sstringw.cpp.
| UINT SStringW::ToUint | ( | ) |
Converts the string to an unsigned integer.
Definition at line 1192 of file sstringw.cpp.
| void SStringW::ToUpper | ( | ) |
Converts the string to uppercase.
Definition at line 861 of file sstringw.cpp.
| void SStringW::Trim | ( | wchar_t | chTarget = VK_SPACE | ) |
Trims leading and trailing whitespace characters from the string.
| chTarget | The character to trim. |
Definition at line 798 of file sstringw.cpp.
| void SStringW::TrimBlank | ( | ) |
Trims leading and trailing whitespace characters from the string.
Definition at line 762 of file sstringw.cpp.
| void SStringW::TrimLeft | ( | wchar_t | chTarget = VK_SPACE | ) |
Trims leading whitespace characters from the string.
| chTarget | The character to trim. |
Definition at line 804 of file sstringw.cpp.
| void SStringW::TrimRight | ( | wchar_t | chTarget = VK_SPACE | ) |
Trims trailing whitespace characters from the string.
| chTarget | The character to trim. |
Definition at line 824 of file sstringw.cpp.
Overloaded inequality operator between two SStringW objects.
| s1 | The first string. |
| s2 | The second string. |
Definition at line 462 of file sstringw.h.
|
friend |
Overloaded inequality operator between an SStringW object and a character array.
| s1 | The string. |
| s2 | The character array. |
Definition at line 471 of file sstringw.h.
|
friend |
Overloaded inequality operator between a character array and an SStringW object.
| s1 | The character array. |
| s2 | The string. |
Definition at line 480 of file sstringw.h.
Overloaded addition operator between an SStringW object and a character array.
| string | The string. |
| psz | The character array. |
Definition at line 608 of file sstringw.h.
Overloaded addition operator between two SStringW objects.
| string1 | The first string. |
| string2 | The second string. |
Definition at line 597 of file sstringw.h.
Overloaded addition operator between an SStringW object and a single character.
| string1 | The string. |
| ch | The character. |
Definition at line 632 of file sstringw.h.
Overloaded addition operator between a character array and an SStringW object.
| psz | The character array. |
| string | The string. |
Definition at line 620 of file sstringw.h.
Overloaded addition operator between a single character and an SStringW object.
| ch | The character. |
| string | The string. |
Definition at line 643 of file sstringw.h.
Overloaded less-than operator between two SStringW objects.
| s1 | The first string. |
| s2 | The second string. |
Definition at line 489 of file sstringw.h.
|
friend |
Overloaded less-than operator between an SStringW object and a character array.
| s1 | The string. |
| s2 | The character array. |
Definition at line 498 of file sstringw.h.
|
friend |
Overloaded less-than operator between a character array and an SStringW object.
| s1 | The character array. |
| s2 | The string. |
Definition at line 507 of file sstringw.h.
Overloaded less-than-or-equal-to operator between two SStringW objects.
| s1 | The first string. |
| s2 | The second string. |
Definition at line 543 of file sstringw.h.
|
friend |
Overloaded less-than-or-equal-to operator between an SStringW object and a character array.
| s1 | The string. |
| s2 | The character array. |
Definition at line 552 of file sstringw.h.
|
friend |
Overloaded less-than-or-equal-to operator between a character array and an SStringW object.
| s1 | The character array. |
| s2 | The string. |
Definition at line 561 of file sstringw.h.
Overloaded equality operator between two SStringW objects.
| s1 | The first string. |
| s2 | The second string. |
Definition at line 435 of file sstringw.h.
|
friend |
Overloaded equality operator between an SStringW object and a character array.
| s1 | The string. |
| s2 | The character array. |
Definition at line 444 of file sstringw.h.
|
friend |
Overloaded equality operator between a character array and an SStringW object.
| s1 | The character array. |
| s2 | The string. |
Definition at line 453 of file sstringw.h.
Overloaded greater-than operator between two SStringW objects.
| s1 | The first string. |
| s2 | The second string. |
Definition at line 516 of file sstringw.h.
|
friend |
Overloaded greater-than operator between an SStringW object and a character array.
| s1 | The string. |
| s2 | The character array. |
Definition at line 525 of file sstringw.h.
|
friend |
Overloaded greater-than operator between a character array and an SStringW object.
| s1 | The character array. |
| s2 | The string. |
Definition at line 534 of file sstringw.h.
Overloaded greater-than-or-equal-to operator between two SStringW objects.
| s1 | The first string. |
| s2 | The second string. |
Definition at line 570 of file sstringw.h.
|
friend |
Overloaded greater-than-or-equal-to operator between an SStringW object and a character array.
| s1 | The string. |
| s2 | The character array. |
Definition at line 579 of file sstringw.h.
|
friend |
Overloaded greater-than-or-equal-to operator between a character array and an SStringW object.
| s1 | The character array. |
| s2 | The string. |
Definition at line 588 of file sstringw.h.
|
protected |
Pointer to the ref counted string data.
Definition at line 763 of file sstringw.h.