This struct provides a namespace for a suite of pure procedures operating on the fundamental type char.

Synopsis

Declared in <bdlb_chartype.h>

struct CharType;

Enums

Name

Description

Unnamed enum

Constants for this component.

Category

Set of character categories supported by this component.

Static Member Functions

Name

Description

isAll

Return true if the specified character is in the ALL category (i.e., [0‐377]), and false otherwise. Note that this function always returns true, but is provide for completeness.

isAlnum

Return true if the specified character is in the ALNUM category (i.e., [0‐9A‐Za‐Z]), and false otherwise.

isAlpha

Return true if the specified character is in the ALPHA category (i.e., [A‐Za‐z]), and false otherwise.

isAlund

Return true if the specified character is in the ALUND category (i.e., [ALPHA|]), and false otherwise.

isAscii

Return true if the specified character is in the ASCII category (i.e., [0‐177]), and false otherwise.

isCategory

Return true if the specified character is in the specified category, and false otherwise.

isCntrl

Return true if the specified character is in the CNTRL category (i.e., [1‐37] and 177), and false otherwise.

isDigit

Return true if the specified character is in the DIGIT category (i.e., [0‐9]), and false otherwise.

isGraph

Return true if the specified character is in the GRAPH category (i.e., any printable character except SPACE), and false otherwise.

isIdent

Return true if the specified character is in the IDENT category (i.e., [ALNUM|]), and false otherwise.

isLower

Return true if the specified character is in the LOWER category (i.e., [a‐z]), and false otherwise.

isNone

Return true if the specified character is in the NONE category (i.e., []), and false otherwise. Note that this function always returns false, but is provided for completeness.

isOdigit

Return true if the specified character is in the ODIGIT category (i.e., [0‐7]), and false otherwise.

isPrint

Return true if the specified character is in the PRINT category (i.e., any printable character including SPACE), and false otherwise.

isPunct

Return true if the specified character is in the PUNCT category (i.e., any printable character other than SPACE or ALNUM), and false otherwise.

isSpace

Return true if the specified character is in the SPACE category (i.e., [space|tab|CR|NL|VT|FF]), and false otherwise.

isUpper

Return true if the specified character is in the UPPER category (i.e., [A‐Z]), and false otherwise.

isXdigit

Return true if the specified character is in the XDIGIT category (i.e., [0‐9A‐Fa‐f]), and false otherwise.

numAll

Return the number of characters in the category ALL. Note that the character string returned by the stringAll method is of length 255, but the terminating null is part of the set.

numAlnum

Return the number of characters in the category ALNUM (i.e., [0‐9A‐Za‐Z]).

numAlpha

Return the number of characters in the category ALPHA (i.e., [A‐Za‐z]).

numAlund

Return the number of characters in the category ALUND (i.e., [ALPHA|]).

numAscii

Return the number of characters in the category ASCII (i.e., [0‐177]).

numCategory

Return the number of characters in the specified category.

numCntrl

Return the number of characters in the category CNTRL (i.e., [1‐37] and 177).

numDigit

Return the number of characters in the category DIGIT (i.e., [0‐9]).

numGraph

Return the number of characters in the category GRAPH (i.e., any printable character except SPACE), and false otherwise.

numIdent

Return the number of characters in the category IDENT (i.e., [ALNUM|]).

numLower

Return the number of characters in the category LOWER (i.e., [a‐z]).

numNone

Return the number of characters in the category NONE. Note that the string returned by the stringNone method is empty.

numOdigit

Return the number of characters in the category ODIGIT (i.e., [0‐7]).

numPrint

Return the number of characters in the category PRINT (i.e., any printable character including SPACE).

numPunct

Return the number of characters in the category PUNCT (i.e., any printable character other than SPACE or ALNUM).

numSpace

Return the number of characters in the category SPACE (i.e., [space|tab|CR|NL|VT|FF]).

numUpper

Return the number of characters in the category UPPER (i.e., [A‐Z]).

numXdigit

Return the number of characters in the category XDIGIT (i.e., [0‐9A‐Fa‐f]).

stringAll

Return a null‐terminated string consisting of all characters in the category ALL (i.e., [0‐377]), ordered by increasing character codes. Note that this string, if printed, may appear to be of length 0 because the NULL character is part of the set and appears first.

stringAlnum

Return a null‐terminated string consisting of all characters in the category ALNUM (i.e., [0‐9A‐Za‐Z]), ordered by increasing character codes.

stringAlpha

Return a null‐terminated string consisting of all characters in the category ALPHA (i.e., [A‐Za‐z]), ordered by increasing character codes.

stringAlund

Return a null‐terminated string consisting of all characters in the category ALUND (i.e., [ALPHA|]), ordered by increasing character codes.

stringAscii

Return a null‐terminated string consisting of all characters in the category ASCII (i.e., [0‐177]), ordered by increasing character codes. Note that this string, if printed, may appear to be of length 0 because the NULL character is part of the set and appears first.

stringCategory

Return a null‐terminated string consisting of all characters in the specified category, ordered by increasing character codes. Note that for category values of CNTRL, ASCII, and `ALL`, this string, if printed, may appear to be of length 0 because the `NULL character is part of the set and appears first.

stringCntrl

Return a null‐terminated string consisting of all characters in the category CNTRL (i.e., [0‐37] and 177), ordered by increasing character codes. Note that this string, if printed, may appear to be of length 0 because the NULL character is part of the set and appears first.

stringDigit

Return a null‐terminated string consisting of all characters in the category DIGIT (i.e., [0‐9]), ordered by increasing character codes.

stringGraph

Return a null‐terminated string consisting of all characters in the category GRAPH (i.e., any printable character except SPACE), ordered by increasing character codes.

stringIdent

Return a null‐terminated string consisting of all characters in the category IDENT (i.e., [ALNUM|]), ordered by increasing character codes.

stringLower

Return a null‐terminated string consisting of all characters in the category LOWER (i.e., [a‐z]), ordered by increasing character codes.

stringNone

Return a null‐terminated string consisting of all characters in the category NONE. Note that this string is empty.

stringOdigit

Return a null‐terminated string consisting of all characters in the category DIGIT (i.e., [0‐7]), ordered by increasing character codes.

stringPrint

Return a null‐terminated string consisting of all characters in the category PRINT (i.e., any printable character including SPACE), ordered by increasing character codes.

stringPunct

Return a null‐terminated string consisting of all characters in the category PUNCT (i.e., any printable character other than SPACE or ALNUM), ordered by increasing character codes.

stringSpace

Return a null‐terminated string consisting of all characters in the category SPACE (i.e., [space|tab|CR|NL|VT|FF]), ordered by increasing character codes.

stringUpper

Return a null‐terminated string consisting of all characters in the category UPPER (i.e., [A‐Z]), ordered by increasing character codes.

stringXdigit

Return a null‐terminated string consisting of all characters in the category XDIGIT (i.e., [0‐9A‐Fa‐f]), ordered by increasing character codes.

toAscii

Return a null‐terminated string representation of the specified character category enumerator that is identical to the enumerator name.

toLower

Return the character in the LOWER category corresponding to the specified input character from the UPPER category or input itself if input is not in category UPPER.

toUpper

Return the character in the UPPER category corresponding to the specified input character from the LOWER category or input itself if input is not in category LOWER.

Created with MrDocs