String

double AtoF(
    const char * pcString1)


Returns the double value produced by interpreting the input characters as a number.


int AtoI(
    const char * pcString1)


Returns the int value produced by interpreting the input characters as a number.


int64 AtoI64(
    const char * pcString1)


Returns the 64-bit integer value produced by interpreting the input characters as a number.


int PrintF(
    const char * pcFormat,
    ...)


Formats and prints a series of characters and values to the standard output stream. Format specifications are exactly the same as in the standard-library “printf” function.


int SNPrintF(
    char * pcBuffer,
    unsigned long ulCount,
    const char * pcFormat,
    ...)


Formats and stores ulCount or fewer characters and values (including a terminating NULL character that is always appended unless ulCount is zero or the formatted string length is greater than or equal to ulCount characters) in pcBuffer. Each argument (if any) is converted and output according to the corresponding format specification in pcFormat. The format consists of ordinary characters and has the same form and function as the standard-library “_snprintf” function.
Returns the number of bytes stored in pcBuffer, not counting the terminating NULL character.


int SNWPrintF(
    short * pwBuffer,
    unsigned long ulCount,
    const short * pwFormat,
    ...)


Formats and stores ulCount or fewer Unicode characters and values (including a terminating NULL character that is always appended unless ulCount is zero or the formatted string length is greater than or equal to ulCount characters) in pwBuffer. Each argument (if any) is converted and output according to the corresponding format specification in pwFormat. The format consists of ordinary characters and has the same form and function as the standard-library “_snwprintf” function.
Returns the number of Unicode characters stored in pwBuffer, not counting the terminating NULL character.


int SPrintF(
    char * pcBuffer,
    const char * pcFormat,
    ...)


Formats and stores a series of characters and values in pcBuffer. Each argument (if any) is converted and output according to the corresponding format specification in pcFormat. The format consists of ordinary characters and has the same form and function as the standard-library “sprintf” function.
Returns the number of bytes stored in pcBuffer, not counting the terminating NULL character.


int SScanF(
    const char * pcBuffer,
    const char * pcFormat,
    ...)


Reads data from pcBuffer into the location given by each argument. Every argument must be a pointer to a variable with a type that corresponds to a type specifier in pcFormat.
The pcFormat argument controls the interpretation of the input fields and has the same form and function as the pcFormat argument for the standard-library “sscanf” function.
If copying takes place between strings that overlap, the behavior is undefined.

Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned.


int SWPrintF(
    short * pwBuffer,
    const short * pwFormat,
    ...)


Formats and stores a series of Unicode characters and values in pwBuffer. Each argument (if any) is converted and output according to the corresponding format specification in pwFormat. The format consists of ordinary characters and has the same form and function as the standard-library “swprintf” function.
Returns the number of Unicode characters stored in pwBuffer, not counting the terminating NULL character.


int SWScanF(
    const short * pwBuffer,
    const short * pwFormat,
    ...)


Reads data from pwBuffer into the location given by each argument. Every argument must be a pointer to a variable with a type that corresponds to a type specifier in pwFormat.
The pwFormat argument controls the interpretation of the input fields and has the same form and function as the pwFormat argument for the standard-library “swscanf” function.
If copying takes place between strings that overlap, the behavior is undefined.

Returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no fields were assigned.


char * StrCat(
    char * pcDest,
    const char * pcSource)


Appends pcSource to pcDest. Returns the destination string.


char * StrChr(
    const char * pcString,
    char cChar)


Returns a pointer to the first occurrence of cChar in pcString, or NULL if cChar is not found.


int StrCmp(
    const char * pcString1,
    const char * pcString2)


Compares the two strings and returns the lexicographic relation of pcString1 to pcString2 (pcString1 less than pcString2, pcString1 equal to pcString2, or pcString1 greater than pcString2).


char * StrCpy(
    char * pcDest,
    const char * pcSource)


Copies pcSource, including the terminating NULL character, to the location specified by pcDest. The behavior of StrCpy() is undefined if the source and destination strings overlap. Returns the destination string.


char * StrDup(
    const char * pcString)


Returns a pointer to the storage location for the copied string or NULL if storage cannot be allocated. The copied string is allocated with Malloc and should be freed with Free when it is no longer needed.


int StrICmp(
    const char * pcString1,
    const char * pcString2)


Lexicographically compares lowercase versions of pcString1 and pcString2 and returns a value indicating their relationship (pcString1 less than pcString2, pcString1 equal to pcString2, or pcString1 greater than pcString2).


unsigned long StrLen(
    const char * pcString)


Returns the number of characters in pcString, excluding the terminal NULL.


char * StrNCat(
    char * pcDest,
    const char * pcSource,
    unsigned long ulCount)


Appends, at most, ulCount characters from pcSource to pcDest. Returns the destination string.


int StrNCmp(
    const char * pcString1,
    const char * pcString2,
    unsigned long ulCount)


Lexicographically compares, at most, the first ulCount characters in pcString1 and pcString2 and returns a value indicating the relationship between the substrings.


char * StrNCpy(
    char * pcDest,
    const char * pcSource,
    unsigned long ulCount)


Copies the initial ulCount characters of pcSource to pcDest and returns pcDest. If ulCount is less than or equal to the length of pcSource, a NULL character is not appended automatically to the copied string. If ulCount is greater than the length of pcSource, the destination string is padded with NULL characters up to length ulCount. The behavior of StrNCpy() is undefined if the source and destination strings overlap.


int StrNICmp(
    const char * pcString1,
    const char * pcString2,
    unsigned long ulCount)


Lexicographically compares lowercase versions of pcString1 and pcString2 and returns a value indicating their relationship (pcString1 less than pcString2, pcString1 equal to pcString2, or pcString1 greater than pcString2).


char * StrRChr(
    const char * pcString,
    char cChar)


Returns a pointer to the last occurrence of cChar in pcString, or NULL if cChar is not found.


unsigned int StrSpn(
    const char * pcString,
    const char * pcCharSet)


Returns the index of the first character in pcString that does not belong to the set of characters in pcCharSet. The search does not include terminating NULL characters.


char * StrStr(
    const char * pcString,
    const char * pcFind)


Returns a pointer to the first occurrence of pcFind in pcString, or NULL if pcFind does not appear in string. If pcFind points to a string of zero length, the function returns string.


char ToLower(
    char cChar)


Converts a given uppercase letter to a lowercase letter if possible and appropriate.


char ToUpper(
    char cChar)


Converts a given lowercase letter to an uppercase letter if possible and appropriate.


short ToWLower(
    short wChar)


Converts a given uppercase letter to a lowercase letter if possible and appropriate.


short ToWUpper(
    short wChar)


Converts a given lowercase letter to an uppercase letter if possible and appropriate.


short * WcsCat(
    short * pwDest,
    const short * pwSource)


Appends pwSource to pwDest. Returns the destination string.


short * WcsChr(
    const short * pwString,
    short wChar)


Returns a pointer to the first occurrence of wChar in pwString, or NULL if wChar is not found.


int WcsCmp(
    const short * pwcString1,
    const short * pwcString2)


Compares the two strings and returns the lexicographic relation of pwcString1 to pwcString2 (pwcString1 less than pwcString2, pwcString1 equal to pwcString2, or pwcString1 greater than pwcString2).


short * WcsCpy(
    short * pwcDest,
    const short * pwcSource)


Copies pwcSource, including the terminating NULL character, to the location specified by pwcDest. The behavior of WcsCpy() is undefined if the source and destination strings overlap. Returns the destination string.


short * WcsDup(
    const short * pwcString)


Returns a pointer to the storage location for the copied Unicode string or NULL if storage cannot be allocated. The copied Unicode string is allocated with Malloc and should be freed with Free when it is no longer needed.


int WcsICmp(
    const short * pwcString1,
    const short * pwcString2)


Lexicographically compares lowercase versions of pwcString1 and pwcString2 and returns a value indicating their relationship (pwcString1 less than pwcString2, pwcString1 equal to pwcString2, or pwcString1 greater than pwcString2).


unsigned long WcsLen(
    const short * pwcString)


Returns the number of 16-bit characters in pwcString, excluding the terminal NULL.


short * WcsNCat(
    short * pwDest,
    const short * pwSource,
    unsigned long ulCount)


Appends, at most, ulCount Unicode characters from pwSource to pwDest. Returns the destination string.


int WcsNCmp(
    const short * pwcString1,
    const short * pwcString2,
    unsigned long ulCount)


Lexicographically compares, at most, the first ulCount Unicode characters in pwString1 and pwString2 and returns a value indicating the relationship between the substrings.


short * WcsNCpy(
    short * pwcDest,
    const short * pwcSource,
    unsigned long ulCount)


Copies the initial ulCount Unicode characters of pwSource to pwDest and returns pwDest. If ulCount is less than or equal to the length of pwSource, a NULL character is not appended automatically to the copied string. If ulCount is greater than the length of pwSource, the destination string is padded with NULL Unicode characters up to length ulCount. The behavior of WcsNCpy() is undefined if the source and destination strings overlap.


int WcsNICmp(
    const short * pwcString1,
    const short * pwcString2,
    unsigned long ulCount)


Lexicographically compares lowercase versions of pwcString1 and pwcString2 and returns a value indicating their relationship (pwcString1 less than pwcString2, pwcString1 equal to pwcString2, or pwcString1 greater than pwcString2).


short * WcsRChr(
    const short * pwString,
    short wChar)


Returns a pointer to the last occurrence of wChar in pwString, or NULL if wChar is not found.


unsigned int WcsSpn(
    const short * pwString,
    const short * pwCharSet)


Returns the index of the first Unicode character in pwString that does not belong to the set of Unicode characters in pwCharSet. The search does not include terminating NULL characters.


short * WcsStr(
    const short * pwString,
    const short * pwFind)


Returns a pointer to the first occurrence of pwFind in pwString, or NULL if pwFind does not appear in string. If pwFind points to a string of zero length, the function returns string.


double WtoF(
    const short * pwcString1)


Returns the double value produced by interpreting the input Unicode characters as a number.


int WtoI(
    const short * pwcString1)


Returns the int value produced by interpreting the input Unicode characters as a number.


int64 WtoI64(
    const short * pwcString1)


Returns the 64-bit integer value produced by interpreting the input Unicode characters as a number.


Copyright © 2006 Shawn (L. Spiro) Wilcoxen