Rudiments
Static Public Member Functions | List of all members
wcharacter Class Reference

#include <wcharacter.h>

Static Public Member Functions

static bool isAlphanumeric (int32_t c)
 
static bool isAlphabetical (int32_t c)
 
static bool isLowerCase (int32_t c)
 
static bool isUpperCase (int32_t c)
 
static bool isPunctuation (int32_t c)
 
static bool isPrintable (int32_t c)
 
static bool isPrintableNonSpace (int32_t c)
 
static bool isControlCharacter (int32_t c)
 
static bool isDigit (int32_t c)
 
static bool isHexDigit (int32_t c)
 
static bool isBlank (int32_t c)
 
static bool isWhitespace (int32_t c)
 
static bool isAscii (int32_t c)
 
static int32_t upper (int32_t c)
 
static int32_t lower (int32_t c)
 
static int32_t convertToAscii (int32_t c)
 
static bool isInSet (wchar_t c, const wchar_t *set)
 
static bool isInSetIgnoringCase (wchar_t c, const wchar_t *set)
 
static wchar_t duplicate (char c)
 
static wchar_t duplicate (char c, wchar_t replacement)
 
static wchar_t duplicateUcs2 (ucs2_t c)
 
static wchar_t duplicateUcs2 (ucs2_t c, wchar_t replacement)
 
static wchar_t duplicateUcs2 (ucs2_t c, bool bigendian)
 
static wchar_t duplicateUcs2 (ucs2_t c, wchar_t replacement, bool bigendian)
 
static uint8_t getNullSize ()
 

Detailed Description

The wcharacter class provides static methods for evaluating and manipulating wide characters.

Member Function Documentation

◆ convertToAscii()

static int32_t wcharacter::convertToAscii ( int32_t c)
static

Converts "c" to a 7-bit value by clearing the higher order bits.

◆ duplicate() [1/2]

static wchar_t wcharacter::duplicate ( char c)
static

Returns the wide character representation of character "c" as interpreted by the character set of the current locale.

◆ duplicate() [2/2]

static wchar_t wcharacter::duplicate ( char c,
wchar_t replacement )
static

Returns the wide character representation of character "c" as interpreted by the character set of the current locale.

Returns "replacement" if character "c" cannot be converted to a wide character.

◆ duplicateUcs2() [1/4]

static wchar_t wcharacter::duplicateUcs2 ( ucs2_t c)
static

Returns the wide character representation of UCS-2 character "c".

"c" is presumed to be in the byte-order of the system.

Returns '?' if UCS-2 character "c" cannot be converted to a character.

◆ duplicateUcs2() [2/4]

static wchar_t wcharacter::duplicateUcs2 ( ucs2_t c,
bool bigendian )
static

Returns the wide character representation of UCS-2 character "c".

If "bigendian" is true then "c" is presumed to be big endian. If "bigendian" is false, then "c" is presumed to be little endian.

Returns '?' if UCS-2 character "c" cannot be converted to a wide character.

◆ duplicateUcs2() [3/4]

static wchar_t wcharacter::duplicateUcs2 ( ucs2_t c,
wchar_t replacement )
static

Returns the wide character representation of UCS-2 character "c".

"c" is presumed to be in the byte-order of the system.

Returns "replacement" if UCS-2 character "c" cannot be converted to a character.

◆ duplicateUcs2() [4/4]

static wchar_t wcharacter::duplicateUcs2 ( ucs2_t c,
wchar_t replacement,
bool bigendian )
static

Returns the wide character representation of UCS-2 character "c".

If "bigendian" is true then "c" is presumed to be big endian. If "bigendian" is false, then "c" is presumed to be little endian.

Returns "replacement" if UCS-2 character "c" cannot be converted to a wide character.

◆ getNullSize()

static uint8_t wcharacter::getNullSize ( )
static

Returns the number of bytes needed to NULL-terminate a string of wide characters.

◆ isAlphabetical()

static bool wcharacter::isAlphabetical ( int32_t c)
static

Returns true if "c" is alphabetical character and false otherwise.

◆ isAlphanumeric()

static bool wcharacter::isAlphanumeric ( int32_t c)
static

Returns true if "c" is an alphanumeric character and false otherwise.

◆ isAscii()

static bool wcharacter::isAscii ( int32_t c)
static

Returns true if "c" is one of the values in the ASCII character set or false otherwise.

◆ isBlank()

static bool wcharacter::isBlank ( int32_t c)
static

Returns true if "c" is a space or tab and false otherwise.

◆ isControlCharacter()

static bool wcharacter::isControlCharacter ( int32_t c)
static

Returns true if "c" is a control character and false otherwise.

◆ isDigit()

static bool wcharacter::isDigit ( int32_t c)
static

Returns true if "c" is a digit and false otherwise.

◆ isHexDigit()

static bool wcharacter::isHexDigit ( int32_t c)
static

Returns true if "c" is a hexadecimal digit and false otherwise.

◆ isInSet()

static bool wcharacter::isInSet ( wchar_t c,
const wchar_t * set )
static

Returns true if "c" is in the set of characters in "set" and false otherwise.

◆ isInSetIgnoringCase()

static bool wcharacter::isInSetIgnoringCase ( wchar_t c,
const wchar_t * set )
static

Returns true if "c" is in the set of characters in "set" (ignoring case) and false otherwise.

◆ isLowerCase()

static bool wcharacter::isLowerCase ( int32_t c)
static

Returns true if "c" is lower case and false otherwise.

◆ isPrintable()

static bool wcharacter::isPrintable ( int32_t c)
static

Returns true if "c" is a printable character and false otherwise.

◆ isPrintableNonSpace()

static bool wcharacter::isPrintableNonSpace ( int32_t c)
static

Returns true if "c" is a printable character other than a space and false otherwise.

◆ isPunctuation()

static bool wcharacter::isPunctuation ( int32_t c)
static

Returns true if "c" is a printable character that is not a space or alphanumeric character and false otherwise.

◆ isUpperCase()

static bool wcharacter::isUpperCase ( int32_t c)
static

Returns true if "c" is upper case and false otherwise.

◆ isWhitespace()

static bool wcharacter::isWhitespace ( int32_t c)
static

Returns true if "c" is any whitespace character and false otherwise.

◆ lower()

static int32_t wcharacter::lower ( int32_t c)
static

Returns the lower case version of "c".

◆ upper()

static int32_t wcharacter::upper ( int32_t c)
static

Returns the upper case version of "c".