soui 5.0.0.1
 
Loading...
Searching...
No Matches
IStringA Struct Reference
Inheritance diagram for IStringA:
SStringA

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.
 
char GetAt (int nIndex) SCONST PURE
 Gets the character at the specified index.
 
void SetAt (int nIndex, char ch) PURE
 Sets the character at the specified index.
 
const char * c_str () SCONST PURE
 Gets a C-style string representation of the string.
 
int Compare (const char *psz) SCONST PURE
 Compares the string with another string.
 
int CompareNoCase (const char *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, char ch) PURE
 Inserts a character at the specified index.
 
int Insert (int nIndex, const char *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 (char chOld, char chNew) PURE
 Replaces all occurrences of a character with another character.
 
int Replace (const char *pszOld, const char *pszNew) PURE
 Replaces all occurrences of a substring with another substring.
 
int Remove (char chRemove) PURE
 Removes all occurrences of a character.
 
int FindChar (char ch, int nStart DEF_VAL(0)) SCONST PURE
 Finds the first occurrence of a character.
 
int ReverseFind (char ch) SCONST PURE
 Finds the last occurrence of a character.
 
int Find (const char *pszSub, int nStart DEF_VAL(0)) SCONST PURE
 Finds the first occurrence of a substring.
 
char * 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.
 
char * 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 IStringA *src) PURE
 Copies the contents of another string.
 
void Assign (LPCSTR src) PURE
 Assigns a C-style string to the string.
 
void Assign2 (LPCSTR 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 (char chTarget DEF_VAL(VK_SPACE)) PURE
 Trims trailing characters from the string.
 
void TrimLeft (char chTarget DEF_VAL(VK_SPACE)) PURE
 Trims leading characters from the string.
 
void Trim (char chTarget DEF_VAL(VK_SPACE)) PURE
 Trims leading and trailing characters from the string.
 
void AppendChar (char ch) PURE
 Appends a character to the string.
 
void AppendStr (const char *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 11 of file sstring-i.h.

Member Function Documentation

◆ AppendChar()

void IStringA::AppendChar ( char ch)

Appends a character to the string.

Parameters
chCharacter to append.

◆ AppendStr()

void IStringA::AppendStr ( const char * pszStr,
int nLen DEF_VAL-1 )

Appends a substring to the string.

Parameters
pszStrSubstring to append.
nLenLength of the substring.

◆ Assign()

void IStringA::Assign ( LPCSTR src)

Assigns a C-style string to the string.

Parameters
srcC-style string to assign.

◆ Assign2()

void IStringA::Assign2 ( LPCSTR 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 char * IStringA::c_str ( )

Gets a C-style string representation of the string.

Returns
Pointer to the C-style string.

◆ Compare()

int IStringA::Compare ( const char * psz)

Compares the string with another string.

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

◆ CompareNoCase()

int IStringA::CompareNoCase ( const char * 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 IStringA::Copy ( const IStringA * src)

Copies the contents of another string.

Parameters
srcSource string.

◆ Delete()

int IStringA::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 IStringA::Find ( const char * 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 IStringA::FindChar ( char 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()

char IStringA::GetAt ( int nIndex)

Gets the character at the specified index.

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

◆ GetBuffer()

char * IStringA::GetBuffer ( int nMinBufLength DEF_VAL-1)

Gets a modifiable buffer for the string.

Parameters
nMinBufLengthMinimum buffer length.
Returns
Pointer to the buffer.

◆ GetBufferSetLength()

char * IStringA::GetBufferSetLength ( int nNewLength)

Gets a buffer with the specified length.

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

◆ GetLength()

int IStringA::GetLength ( )

Gets the length of the string.

Returns
The length of the string.

◆ GetPrivData()

LPVOID IStringA::GetPrivData ( )

Gets private data associated with the string.

Returns
Pointer to private data.

◆ Insert()

int IStringA::Insert ( int nIndex,
const char * 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 IStringA::InsertChar ( int nIndex,
char 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 IStringA::IsEmpty ( )

Checks if the string is empty.

Returns
TRUE if the string is empty, FALSE otherwise.

◆ ReleaseBuffer()

void IStringA::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 IStringA::Remove ( char chRemove)

Removes all occurrences of a character.

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

◆ Replace()

int IStringA::Replace ( const char * pszOld,
const char * 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 IStringA::ReplaceChar ( char chOld,
char 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 IStringA::ReverseFind ( char 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 IStringA::SetAt ( int nIndex,
char ch )

Sets the character at the specified index.

Parameters
nIndexIndex of the character.
chCharacter to set.

◆ SetLength()

void IStringA::SetLength ( int nLength)

Sets the length of the string.

Parameters
nLengthNew length of the string.

◆ ToBool()

BOOL IStringA::ToBool ( )

Converts the string to a boolean.

Returns
The boolean value.

◆ ToDouble()

double IStringA::ToDouble ( )

Converts the string to a double.

Returns
The double value.

◆ ToFloat()

float IStringA::ToFloat ( )

Converts the string to a float.

Returns
The float value.

◆ ToInt()

int IStringA::ToInt ( )

Converts the string to an integer.

Returns
The integer value.

◆ ToLong()

long IStringA::ToLong ( )

Converts the string to a long integer.

Returns
The long integer value.

◆ ToUint()

UINT IStringA::ToUint ( )

Converts the string to an unsigned integer.

Returns
The unsigned integer value.

◆ Trim()

void IStringA::Trim ( char chTarget DEF_VALVK_SPACE)

Trims leading and trailing characters from the string.

Parameters
chTargetCharacter to trim.

◆ TrimLeft()

void IStringA::TrimLeft ( char chTarget DEF_VALVK_SPACE)

Trims leading characters from the string.

Parameters
chTargetCharacter to trim.

◆ TrimRight()

void IStringA::TrimRight ( char 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: