soui 5.0.0.1
 
Loading...
Searching...
No Matches
IStringW Struct Reference
Inheritance diagram for IStringW:
SStringW

Public Member Functions

int GetLength () SCONST PURE
 Gets the length of the string.
 
BOOL IsEmpty () SCONST PURE
 Checks if the string is empty.
 
void Empty () PURE
 Empties the string.
 
wchar_t GetAt (int nIndex) SCONST PURE
 Gets the character at the specified index.
 
void SetAt (int nIndex, wchar_t ch) PURE
 Sets the character at the specified index.
 
const wchar_t * c_str () SCONST PURE
 Gets a C-style string representation of the string.
 
int Compare (const wchar_t *psz) SCONST PURE
 Compares the string with another string.
 
int CompareNoCase (const wchar_t *psz) SCONST PURE
 Compares the string with another string, ignoring case.
 
void TrimBlank () PURE
 Trims leading and trailing whitespace from the string.
 
int InsertChar (int nIndex, wchar_t ch) PURE
 Inserts a character at the specified index.
 
int Insert (int nIndex, const wchar_t *psz) PURE
 Inserts a substring at the specified index.
 
int Delete (int nIndex, int nCount) PURE
 Deletes a substring from the specified index.
 
int ReplaceChar (wchar_t chOld, wchar_t chNew) PURE
 Replaces all occurrences of a character with another character.
 
int Replace (const wchar_t *pszOld, const wchar_t *pszNew) PURE
 Replaces all occurrences of a substring with another substring.
 
int Remove (wchar_t chRemove) PURE
 Removes all occurrences of a character.
 
int FindChar (wchar_t ch, int nStart DEF_VAL(0)) SCONST PURE
 Finds the first occurrence of a character.
 
int ReverseFind (wchar_t ch) SCONST PURE
 Finds the last occurrence of a character.
 
int Find (const wchar_t *pszSub, int nStart DEF_VAL(0)) SCONST PURE
 Finds the first occurrence of a substring.
 
wchar_t * GetBuffer (int nMinBufLength DEF_VAL(-1)) PURE
 Gets a modifiable buffer for the string.
 
void ReleaseBuffer (int nNewLength DEF_VAL(-1)) PURE
 Releases the buffer and sets the new length of the string.
 
wchar_t * GetBufferSetLength (int nNewLength) PURE
 Gets a buffer with the specified length.
 
void SetLength (int nLength) PURE
 Sets the length of the string.
 
void Copy (const IStringW *src) PURE
 Copies the contents of another string.
 
void Assign (LPCWSTR src) PURE
 Assigns a C-style string to the string.
 
void Assign2 (LPCWSTR src, int nLen DEF_VAL(-1)) PURE
 Assigns a substring of a C-style string to the string.
 
LPVOID GetPrivData () SCONST PURE
 Gets private data associated with the string.
 
void ToUpper () PURE
 Converts the string to uppercase.
 
void ToLower () PURE
 Converts the string to lowercase.
 
void TrimRight (wchar_t chTarget DEF_VAL(VK_SPACE)) PURE
 Trims trailing characters from the string.
 
void TrimLeft (wchar_t chTarget DEF_VAL(VK_SPACE)) PURE
 Trims leading characters from the string.
 
void Trim (wchar_t chTarget DEF_VAL(VK_SPACE)) PURE
 Trims leading and trailing characters from the string.
 
void AppendChar (wchar_t ch) PURE
 Appends a character to the string.
 
void AppendStr (const wchar_t *pszStr, int nLen DEF_VAL(-1)) PURE
 Appends a substring to the string.
 
void Release () PURE
 Releases the string.
 
UINT ToUint () SCONST PURE
 Converts the string to an unsigned integer.
 
long ToLong () SCONST PURE
 Converts the string to a long integer.
 
int ToInt () SCONST PURE
 Converts the string to an integer.
 
float ToFloat () SCONST PURE
 Converts the string to a float.
 
double ToDouble () SCONST PURE
 Converts the string to a double.
 
BOOL ToBool () SCONST PURE
 Converts the string to a boolean.
 

Detailed Description

Definition at line 275 of file sstring-i.h.

Member Function Documentation

◆ AppendChar()

void IStringW::AppendChar ( wchar_t ch)

Appends a character to the string.

Parameters
chCharacter to append.

◆ AppendStr()

void IStringW::AppendStr ( const wchar_t * pszStr,
int nLen DEF_VAL-1 )

Appends a substring to the string.

Parameters
pszStrSubstring to append.
nLenLength of the substring.

◆ Assign()

void IStringW::Assign ( LPCWSTR src)

Assigns a C-style string to the string.

Parameters
srcC-style string to assign.

◆ Assign2()

void IStringW::Assign2 ( LPCWSTR src,
int nLen DEF_VAL-1 )

Assigns a substring of a C-style string to the string.

Parameters
srcC-style string to assign.
nLenLength of the substring.

◆ c_str()

const wchar_t * IStringW::c_str ( )

Gets a C-style string representation of the string.

Returns
Pointer to the C-style string.

◆ Compare()

int IStringW::Compare ( const wchar_t * psz)

Compares the string with another string.

Parameters
pszString to compare with.
Returns
0 if equal, < 0 if less, > 0 if greater.

◆ CompareNoCase()

int IStringW::CompareNoCase ( const wchar_t * psz)

Compares the string with another string, ignoring case.

Parameters
pszString to compare with.
Returns
0 if equal, < 0 if less, > 0 if greater.

◆ Copy()

void IStringW::Copy ( const IStringW * src)

Copies the contents of another string.

Parameters
srcSource string.

◆ Delete()

int IStringW::Delete ( int nIndex,
int nCount )

Deletes a substring from the specified index.

Parameters
nIndexIndex to start deletion.
nCountNumber of characters to delete.
Returns
The new length of the string.

◆ Find()

int IStringW::Find ( const wchar_t * pszSub,
int nStart DEF_VAL0 )

Finds the first occurrence of a substring.

Parameters
pszSubSubstring to find.
nStartStarting index for the search.
Returns
Index of the first occurrence, or -1 if not found.

◆ FindChar()

int IStringW::FindChar ( wchar_t ch,
int nStart DEF_VAL0 )

Finds the first occurrence of a character.

Parameters
chCharacter to find.
nStartStarting index for the search.
Returns
Index of the first occurrence, or -1 if not found.

◆ GetAt()

wchar_t IStringW::GetAt ( int nIndex)

Gets the character at the specified index.

Parameters
nIndexIndex of the character.
Returns
The character at the specified index.

◆ GetBuffer()

wchar_t * IStringW::GetBuffer ( int nMinBufLength DEF_VAL-1)

Gets a modifiable buffer for the string.

Parameters
nMinBufLengthMinimum buffer length.
Returns
Pointer to the buffer.

◆ GetBufferSetLength()

wchar_t * IStringW::GetBufferSetLength ( int nNewLength)

Gets a buffer with the specified length.

Parameters
nNewLengthNew length of the buffer.
Returns
Pointer to the buffer.

◆ GetLength()

int IStringW::GetLength ( )

Gets the length of the string.

Returns
The length of the string.

◆ GetPrivData()

LPVOID IStringW::GetPrivData ( )

Gets private data associated with the string.

Returns
Pointer to private data.

◆ Insert()

int IStringW::Insert ( int nIndex,
const wchar_t * psz )

Inserts a substring at the specified index.

Parameters
nIndexIndex to insert at.
pszSubstring to insert.
Returns
The new length of the string.

◆ InsertChar()

int IStringW::InsertChar ( int nIndex,
wchar_t ch )

Inserts a character at the specified index.

Parameters
nIndexIndex to insert at.
chCharacter to insert.
Returns
The new length of the string.

◆ IsEmpty()

BOOL IStringW::IsEmpty ( )

Checks if the string is empty.

Returns
TRUE if the string is empty, FALSE otherwise.

◆ ReleaseBuffer()

void IStringW::ReleaseBuffer ( int nNewLength DEF_VAL-1)

Releases the buffer and sets the new length of the string.

Parameters
nNewLengthNew length of the string.

◆ Remove()

int IStringW::Remove ( wchar_t chRemove)

Removes all occurrences of a character.

Parameters
chRemoveCharacter to remove.
Returns
The number of characters removed.

◆ Replace()

int IStringW::Replace ( const wchar_t * pszOld,
const wchar_t * pszNew )

Replaces all occurrences of a substring with another substring.

Parameters
pszOldSubstring to replace.
pszNewSubstring to replace with.
Returns
The number of replacements made.

◆ ReplaceChar()

int IStringW::ReplaceChar ( wchar_t chOld,
wchar_t chNew )

Replaces all occurrences of a character with another character.

Parameters
chOldCharacter to replace.
chNewCharacter to replace with.
Returns
The number of replacements made.

◆ ReverseFind()

int IStringW::ReverseFind ( wchar_t ch)

Finds the last occurrence of a character.

Parameters
chCharacter to find.
Returns
Index of the last occurrence, or -1 if not found.

◆ SetAt()

void IStringW::SetAt ( int nIndex,
wchar_t ch )

Sets the character at the specified index.

Parameters
nIndexIndex of the character.
chCharacter to set.

◆ SetLength()

void IStringW::SetLength ( int nLength)

Sets the length of the string.

Parameters
nLengthNew length of the string.

◆ ToBool()

BOOL IStringW::ToBool ( )

Converts the string to a boolean.

Returns
The boolean value.

◆ ToDouble()

double IStringW::ToDouble ( )

Converts the string to a double.

Returns
The double value.

◆ ToFloat()

float IStringW::ToFloat ( )

Converts the string to a float.

Returns
The float value.

◆ ToInt()

int IStringW::ToInt ( )

Converts the string to an integer.

Returns
The integer value.

◆ ToLong()

long IStringW::ToLong ( )

Converts the string to a long integer.

Returns
The long integer value.

◆ ToUint()

UINT IStringW::ToUint ( )

Converts the string to an unsigned integer.

Returns
The unsigned integer value.

◆ Trim()

void IStringW::Trim ( wchar_t chTarget DEF_VALVK_SPACE)

Trims leading and trailing characters from the string.

Parameters
chTargetCharacter to trim.

◆ TrimLeft()

void IStringW::TrimLeft ( wchar_t chTarget DEF_VALVK_SPACE)

Trims leading characters from the string.

Parameters
chTargetCharacter to trim.

◆ TrimRight()

void IStringW::TrimRight ( wchar_t chTarget DEF_VALVK_SPACE)

Trims trailing characters from the string.

Parameters
chTargetCharacter to trim.

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