Character traits for ASCII strings.
More...
#include <sstringw.h>
|
static size_t | StrLen (const wchar_t *psz) |
| Computes the length of a null-terminated string.
|
|
static int | Compare (const wchar_t *psz1, const wchar_t *psz2) |
| Compares two strings lexicographically.
|
|
static int | CompareNoCase (const wchar_t *psz1, const wchar_t *psz2) |
| Compares two strings lexicographically, ignoring case.
|
|
static const wchar_t * | StrChr (const wchar_t *psz, wchar_t ch) |
| Finds the first occurrence of a character in a string.
|
|
static const wchar_t * | StrRChr (const wchar_t *psz, wchar_t ch) |
| Finds the last occurrence of a character in a string.
|
|
static const wchar_t * | StrStr (const wchar_t *psz, const wchar_t *psz2) |
| Finds the first occurrence of a substring in a string.
|
|
static wchar_t * | StrUpper (wchar_t *psz) |
| Converts a string to uppercase.
|
|
static wchar_t * | StrLower (wchar_t *psz) |
| Converts a string to lowercase.
|
|
static int | IsSpace (wchar_t ch) |
| Checks if a character is a whitespace character.
|
|
static wchar_t | CharLower (wchar_t ch) |
| Converts a character to lowercase.
|
|
static wchar_t | CharUpper (wchar_t ch) |
| Converts a character to uppercase.
|
|
static wchar_t * | CharNext (wchar_t *psz) |
| Moves to the next character in a string.
|
|
static int | Format (wchar_t **ppszDst, const wchar_t *pszFormat, va_list &args) |
| Formats a string using a format string and variable arguments.
|
|
static int | LoadString (HINSTANCE hInst, UINT uID, wchar_t *lpBuffer, int nBufferMax) |
| Loads a string resource from a module.
|
|
Character traits for ASCII strings.
Definition at line 11 of file sstringw.h.
◆ CharLower()
wchar_t wchar_traits::CharLower |
( |
wchar_t | ch | ) |
|
|
static |
Converts a character to lowercase.
- Parameters
-
ch | The character to convert. |
- Returns
- The lowercase version of the character.
Definition at line 80 of file sstringw.cpp.
◆ CharNext()
wchar_t * wchar_traits::CharNext |
( |
wchar_t * | psz | ) |
|
|
static |
Moves to the next character in a string.
- Parameters
-
psz | The string to move through. |
- Returns
- A pointer to the next character in the string.
Definition at line 70 of file sstringw.cpp.
◆ CharUpper()
wchar_t wchar_traits::CharUpper |
( |
wchar_t | ch | ) |
|
|
static |
Converts a character to uppercase.
- Parameters
-
ch | The character to convert. |
- Returns
- The uppercase version of the character.
Definition at line 75 of file sstringw.cpp.
◆ Compare()
int wchar_traits::Compare |
( |
const wchar_t * | psz1, |
|
|
const wchar_t * | psz2 ) |
|
static |
Compares two strings lexicographically.
- Parameters
-
psz1 | The first string. |
psz2 | The second string. |
- Returns
- An integer less than, equal to, or greater than zero if psz1 is found, respectively, to be less than, to match, or be greater than psz2.
Definition at line 120 of file sstringw.cpp.
◆ CompareNoCase()
int wchar_traits::CompareNoCase |
( |
const wchar_t * | psz1, |
|
|
const wchar_t * | psz2 ) |
|
static |
Compares two strings lexicographically, ignoring case.
- Parameters
-
psz1 | The first string. |
psz2 | The second string. |
- Returns
- An integer less than, equal to, or greater than zero if psz1 is found, respectively, to be less than, to match, or be greater than psz2.
Definition at line 115 of file sstringw.cpp.
◆ Format()
int wchar_traits::Format |
( |
wchar_t ** | ppszDst, |
|
|
const wchar_t * | pszFormat, |
|
|
va_list & | args ) |
|
static |
Formats a string using a format string and variable arguments.
- Parameters
-
ppszDst | The destination string buffer. |
pszFormat | The format string. |
args | The variable arguments list. |
- Returns
- The number of characters written to the buffer.
Definition at line 18 of file sstringw.cpp.
◆ IsSpace()
int wchar_traits::IsSpace |
( |
wchar_t | ch | ) |
|
|
static |
Checks if a character is a whitespace character.
- Parameters
-
ch | The character to check. |
- Returns
- Non-zero if the character is a whitespace character, zero otherwise.
Definition at line 85 of file sstringw.cpp.
◆ LoadString()
SNSBEGIN int wchar_traits::LoadString |
( |
HINSTANCE | hInst, |
|
|
UINT | uID, |
|
|
wchar_t * | lpBuffer, |
|
|
int | nBufferMax ) |
|
static |
Loads a string resource from a module.
- Parameters
-
hInst | The handle to the module. |
uID | The resource identifier. |
lpBuffer | The buffer to store the loaded string. |
nBufferMax | The maximum size of the buffer. |
- Returns
- The number of characters copied to the buffer.
Definition at line 9 of file sstringw.cpp.
◆ StrChr()
const wchar_t * wchar_traits::StrChr |
( |
const wchar_t * | psz, |
|
|
wchar_t | ch ) |
|
static |
Finds the first occurrence of a character in a string.
- Parameters
-
psz | The string to search. |
ch | The character to find. |
- Returns
- A pointer to the first occurrence of ch in psz, or NULL if ch is not found.
Definition at line 110 of file sstringw.cpp.
◆ StrLen()
size_t wchar_traits::StrLen |
( |
const wchar_t * | psz | ) |
|
|
static |
Computes the length of a null-terminated string.
- Parameters
-
psz | The string to measure. |
- Returns
- The length of the string.
Definition at line 125 of file sstringw.cpp.
◆ StrLower()
wchar_t * wchar_traits::StrLower |
( |
wchar_t * | psz | ) |
|
|
static |
Converts a string to lowercase.
- Parameters
-
psz | The string to convert. |
- Returns
- A pointer to the converted string.
Definition at line 90 of file sstringw.cpp.
◆ StrRChr()
const wchar_t * wchar_traits::StrRChr |
( |
const wchar_t * | psz, |
|
|
wchar_t | ch ) |
|
static |
Finds the last occurrence of a character in a string.
- Parameters
-
psz | The string to search. |
ch | The character to find. |
- Returns
- A pointer to the last occurrence of ch in psz, or NULL if ch is not found.
Definition at line 105 of file sstringw.cpp.
◆ StrStr()
const wchar_t * wchar_traits::StrStr |
( |
const wchar_t * | psz, |
|
|
const wchar_t * | psz2 ) |
|
static |
Finds the first occurrence of a substring in a string.
- Parameters
-
psz | The string to search. |
psz2 | The substring to find. |
- Returns
- A pointer to the first occurrence of psz2 in psz, or NULL if psz2 is not found.
Definition at line 100 of file sstringw.cpp.
◆ StrUpper()
wchar_t * wchar_traits::StrUpper |
( |
wchar_t * | psz | ) |
|
|
static |
Converts a string to uppercase.
- Parameters
-
psz | The string to convert. |
- Returns
- A pointer to the converted string.
Definition at line 95 of file sstringw.cpp.
The documentation for this struct was generated from the following files: