soui 5.0.0.1
Soui5 Doc
 
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
char_traits Struct Reference

Character traits for ASCII strings. More...

#include <sstringa.h>

Static Public Member Functions

static size_t StrLen (const char *psz)
 Computes the length of a null-terminated string.
 
static int Compare (const char *psz1, const char *psz2)
 Compares two strings lexicographically.
 
static int CompareNoCase (const char *psz1, const char *psz2)
 Compares two strings lexicographically, ignoring case.
 
static const char * StrChr (const char *psz, char ch)
 Finds the first occurrence of a character in a string.
 
static const char * StrRChr (const char *psz, char ch)
 Finds the last occurrence of a character in a string.
 
static const char * StrStr (const char *psz, const char *psz2)
 Finds the first occurrence of a substring in a string.
 
static char * StrUpper (char *psz)
 Converts a string to uppercase.
 
static char * StrLower (char *psz)
 Converts a string to lowercase.
 
static int IsSpace (char ch)
 Checks if a character is a whitespace character.
 
static char CharLower (char ch)
 Converts a character to lowercase.
 
static char CharUpper (char ch)
 Converts a character to uppercase.
 
static char * CharNext (char *psz)
 Moves to the next character in a string.
 
static int Format (char **ppszDst, const char *pszFormat, va_list &args)
 Formats a string using a format string and variable arguments.
 
static int LoadString (HINSTANCE hInst, UINT uID, char *lpBuffer, int nBufferMax)
 Loads a string resource from a module.
 

Detailed Description

Character traits for ASCII strings.

Definition at line 11 of file sstringa.h.

Member Function Documentation

◆ CharLower()

char char_traits::CharLower ( char ch)
static

Converts a character to lowercase.

Parameters
chThe character to convert.
Returns
The lowercase version of the character.

Definition at line 54 of file sstringa.cpp.

◆ CharNext()

char * char_traits::CharNext ( char * psz)
static

Moves to the next character in a string.

Parameters
pszThe string to move through.
Returns
A pointer to the next character in the string.

Definition at line 40 of file sstringa.cpp.

◆ CharUpper()

char char_traits::CharUpper ( char ch)
static

Converts a character to uppercase.

Parameters
chThe character to convert.
Returns
The uppercase version of the character.

Definition at line 49 of file sstringa.cpp.

◆ Compare()

int char_traits::Compare ( const char * psz1,
const char * psz2 )
static

Compares two strings lexicographically.

Parameters
psz1The first string.
psz2The 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 122 of file sstringa.cpp.

◆ CompareNoCase()

int char_traits::CompareNoCase ( const char * psz1,
const char * psz2 )
static

Compares two strings lexicographically, ignoring case.

Parameters
psz1The first string.
psz2The 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 113 of file sstringa.cpp.

◆ Format()

int char_traits::Format ( char ** ppszDst,
const char * pszFormat,
va_list & args )
static

Formats a string using a format string and variable arguments.

Parameters
ppszDstThe destination string buffer.
pszFormatThe format string.
argsThe variable arguments list.
Returns
The number of characters written to the buffer.

Definition at line 24 of file sstringa.cpp.

◆ IsSpace()

int char_traits::IsSpace ( char ch)
static

Checks if a character is a whitespace character.

Parameters
chThe character to check.
Returns
Non-zero if the character is a whitespace character, zero otherwise.

Definition at line 59 of file sstringa.cpp.

◆ LoadString()

SNSBEGIN int char_traits::LoadString ( HINSTANCE hInst,
UINT uID,
char * lpBuffer,
int nBufferMax )
static

Loads a string resource from a module.

Parameters
hInstThe handle to the module.
uIDThe resource identifier.
lpBufferThe buffer to store the loaded string.
nBufferMaxThe maximum size of the buffer.
Returns
The number of characters copied to the buffer.

Definition at line 15 of file sstringa.cpp.

◆ StrChr()

const char * char_traits::StrChr ( const char * psz,
char ch )
static

Finds the first occurrence of a character in a string.

Parameters
pszThe string to search.
chThe character to find.
Returns
A pointer to the first occurrence of ch in psz, or NULL if ch is not found.

Definition at line 104 of file sstringa.cpp.

◆ StrLen()

size_t char_traits::StrLen ( const char * psz)
static

Computes the length of a null-terminated string.

Parameters
pszThe string to measure.
Returns
The length of the string.

Definition at line 131 of file sstringa.cpp.

◆ StrLower()

char * char_traits::StrLower ( char * psz)
static

Converts a string to lowercase.

Parameters
pszThe string to convert.
Returns
A pointer to the converted string.

Definition at line 68 of file sstringa.cpp.

◆ StrRChr()

const char * char_traits::StrRChr ( const char * psz,
char ch )
static

Finds the last occurrence of a character in a string.

Parameters
pszThe string to search.
chThe character to find.
Returns
A pointer to the last occurrence of ch in psz, or NULL if ch is not found.

Definition at line 95 of file sstringa.cpp.

◆ StrStr()

const char * char_traits::StrStr ( const char * psz,
const char * psz2 )
static

Finds the first occurrence of a substring in a string.

Parameters
pszThe string to search.
psz2The substring to find.
Returns
A pointer to the first occurrence of psz2 in psz, or NULL if psz2 is not found.

Definition at line 86 of file sstringa.cpp.

◆ StrUpper()

char * char_traits::StrUpper ( char * psz)
static

Converts a string to uppercase.

Parameters
pszThe string to convert.
Returns
A pointer to the converted string.

Definition at line 77 of file sstringa.cpp.


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