#include <bdlb_chartype.h>
|
| enum | Category {
e_UPPER
, e_LOWER
, e_ALPHA
, e_DIGIT
,
e_XDIGIT
, e_ALNUM
, e_SPACE
, e_PRINT
,
e_GRAPH
, e_PUNCT
, e_CNTRL
, e_ASCII
,
e_IDENT
, e_ALUND
, e_ALL
, e_NONE
,
e_ODIGIT
, BDEU_UPPER = e_UPPER
, BDEU_LOWER = e_LOWER
, BDEU_ALPHA = e_ALPHA
,
BDEU_ODIGIT = e_ODIGIT
, BDEU_DIGIT = e_DIGIT
, BDEU_XDIGIT = e_XDIGIT
, BDEU_ALNUM = e_ALNUM
,
BDEU_SPACE = e_SPACE
, BDEU_PRINT = e_PRINT
, BDEU_GRAPH = e_GRAPH
, BDEU_PUNCT = e_PUNCT
,
BDEU_CNTRL = e_CNTRL
, BDEU_ASCII = e_ASCII
, BDEU_IDENT = e_IDENT
, BDEU_ALUND = e_ALUND
,
BDEU_ALL = e_ALL
, BDEU_NONE = e_NONE
, UPPER = e_UPPER
, LOWER = e_LOWER
,
ALPHA = e_ALPHA
, DIGIT = e_DIGIT
, XDIGIT = e_XDIGIT
, ALNUM = e_ALNUM
,
SPACE = e_SPACE
, PRINT = e_PRINT
, GRAPH = e_GRAPH
, PUNCT = e_PUNCT
,
CNTRL = e_CNTRL
, ASCII = e_ASCII
, IDENT = e_IDENT
, ALUND = e_ALUND
,
ALL = e_ALL
, NONE = e_NONE
} |
| | Set of character categories supported by this component. More...
|
| |
| enum | { k_NUM_CATEGORIES = e_ODIGIT + 1
, BDEU_NUM_CATEGORIES = k_NUM_CATEGORIES
} |
| | Current number of categories supported by this component. More...
|
| |
This struct provides a namespace for a suite of pure procedures operating on the fundamental type char.
◆ anonymous enum
| Enumerator |
|---|
| k_NUM_CATEGORIES | |
| BDEU_NUM_CATEGORIES | |
◆ Category
| Enumerator |
|---|
| e_UPPER | |
| e_LOWER | |
| e_ALPHA | |
| e_DIGIT | |
| e_XDIGIT | |
| e_ALNUM | |
| e_SPACE | |
| e_PRINT | |
| e_GRAPH | |
| e_PUNCT | |
| e_CNTRL | |
| e_ASCII | |
| e_IDENT | |
| e_ALUND | |
| e_ALL | |
| e_NONE | |
| e_ODIGIT | |
| BDEU_UPPER | |
| BDEU_LOWER | |
| BDEU_ALPHA | |
| BDEU_ODIGIT | |
| BDEU_DIGIT | |
| BDEU_XDIGIT | |
| BDEU_ALNUM | |
| BDEU_SPACE | |
| BDEU_PRINT | |
| BDEU_GRAPH | |
| BDEU_PUNCT | |
| BDEU_CNTRL | |
| BDEU_ASCII | |
| BDEU_IDENT | |
| BDEU_ALUND | |
| BDEU_ALL | |
| BDEU_NONE | |
| UPPER | |
| LOWER | |
| ALPHA | |
| DIGIT | |
| XDIGIT | |
| ALNUM | |
| SPACE | |
| PRINT | |
| GRAPH | |
| PUNCT | |
| CNTRL | |
| ASCII | |
| IDENT | |
| ALUND | |
| ALL | |
| NONE | |
◆ isAll()
| bool bdlb::CharType::isAll |
( |
char |
character | ) |
|
|
inlinestatic |
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()
| bool bdlb::CharType::isAlnum |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the ALNUM category (i.e., [0-9A-Za-Z]), and false otherwise.
◆ isAlpha()
| bool bdlb::CharType::isAlpha |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the ALPHA category (i.e., [A-Za-z]), and false otherwise.
◆ isAlund()
| bool bdlb::CharType::isAlund |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the ALUND category (i.e., [ALPHA|_]), and false otherwise.
◆ isAscii()
| bool bdlb::CharType::isAscii |
( |
char |
character | ) |
|
|
inlinestatic |
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()
| bool bdlb::CharType::isCntrl |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the CNTRL category (i.e., [\1-\37] and \177), and false otherwise.
◆ isDigit()
| bool bdlb::CharType::isDigit |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the DIGIT category (i.e., [0-9]), and false otherwise.
◆ isGraph()
| bool bdlb::CharType::isGraph |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the GRAPH category (i.e., any printable character except SPACE), and false otherwise.
◆ isIdent()
| bool bdlb::CharType::isIdent |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the IDENT category (i.e., [ALNUM|_]), and false otherwise.
◆ isLower()
| bool bdlb::CharType::isLower |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the LOWER category (i.e., [a-z]), and false otherwise.
◆ isNone()
| bool bdlb::CharType::isNone |
( |
char |
character | ) |
|
|
inlinestatic |
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()
| bool bdlb::CharType::isOdigit |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the ODIGIT category (i.e., [0-7]), and false otherwise.
◆ isPrint()
| bool bdlb::CharType::isPrint |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the PRINT category (i.e., any printable character including SPACE), and false otherwise.
◆ isPunct()
| bool bdlb::CharType::isPunct |
( |
char |
character | ) |
|
|
inlinestatic |
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()
| bool bdlb::CharType::isSpace |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the SPACE category (i.e., [space|tab|CR|NL|VT|FF]), and false otherwise.
◆ isUpper()
| bool bdlb::CharType::isUpper |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the UPPER category (i.e., [A-Z]), and false otherwise.
◆ isXdigit()
| bool bdlb::CharType::isXdigit |
( |
char |
character | ) |
|
|
inlinestatic |
Return true if the specified character is in the XDIGIT category (i.e., [0-9A-Fa-f]), and false otherwise.
◆ numAll()
| int bdlb::CharType::numAll |
( |
| ) |
|
|
inlinestatic |
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()
| int bdlb::CharType::numAlnum |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category ALNUM (i.e., [0-9A-Za-Z]).
◆ numAlpha()
| int bdlb::CharType::numAlpha |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category ALPHA (i.e., [A-Za-z]).
◆ numAlund()
| int bdlb::CharType::numAlund |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category ALUND (i.e., [ALPHA|_]).
◆ numAscii()
| int bdlb::CharType::numAscii |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category ASCII (i.e., [\0-\177]).
◆ numCategory()
◆ numCntrl()
| int bdlb::CharType::numCntrl |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category CNTRL (i.e., [\1-\37] and \177).
◆ numDigit()
| int bdlb::CharType::numDigit |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category DIGIT (i.e., [0-9]).
◆ numGraph()
| int bdlb::CharType::numGraph |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category GRAPH (i.e., any printable character except SPACE), and false otherwise.
◆ numIdent()
| int bdlb::CharType::numIdent |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category IDENT (i.e., [ALNUM|_]).
◆ numLower()
| int bdlb::CharType::numLower |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category LOWER (i.e., [a-z]).
◆ numNone()
| int bdlb::CharType::numNone |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category NONE. Note that the string returned by the stringNone method is empty.
◆ numOdigit()
| int bdlb::CharType::numOdigit |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category ODIGIT (i.e., [0-7]).
◆ numPrint()
| int bdlb::CharType::numPrint |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category PRINT (i.e., any printable character including SPACE).
◆ numPunct()
| int bdlb::CharType::numPunct |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category PUNCT (i.e., any printable character other than SPACE or ALNUM).
◆ numSpace()
| int bdlb::CharType::numSpace |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category SPACE (i.e., [space|tab|CR|NL|VT|FF]).
◆ numUpper()
| int bdlb::CharType::numUpper |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category UPPER (i.e., [A-Z]).
◆ numXdigit()
| int bdlb::CharType::numXdigit |
( |
| ) |
|
|
inlinestatic |
Return the number of characters in the category XDIGIT (i.e., [0-9A-Fa-f]).
◆ stringAll()
| const char * bdlb::CharType::stringAll |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringAlnum |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringAlpha |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category ALPHA (i.e., [A-Za-z]), ordered by increasing character codes.
◆ stringAlund()
| const char * bdlb::CharType::stringAlund |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category ALUND (i.e., [ALPHA|_]), ordered by increasing character codes.
◆ stringAscii()
| const char * bdlb::CharType::stringAscii |
( |
| ) |
|
|
inlinestatic |
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, andALL, this string, if printed, may appear to be of length 0 because the NULL` character is part of the set and appears first.
◆ stringCntrl()
| const char * bdlb::CharType::stringCntrl |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringDigit |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category DIGIT (i.e., [0-9]), ordered by increasing character codes.
◆ stringGraph()
| const char * bdlb::CharType::stringGraph |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringIdent |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category IDENT (i.e., [ALNUM|_]), ordered by increasing character codes.
◆ stringLower()
| const char * bdlb::CharType::stringLower |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category LOWER (i.e., [a-z]), ordered by increasing character codes.
◆ stringNone()
| const char * bdlb::CharType::stringNone |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category NONE. Note that this string is empty.
◆ stringOdigit()
| const char * bdlb::CharType::stringOdigit |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category DIGIT (i.e., [0-7]), ordered by increasing character codes.
◆ stringPrint()
| const char * bdlb::CharType::stringPrint |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringPunct |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringSpace |
( |
| ) |
|
|
inlinestatic |
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()
| const char * bdlb::CharType::stringUpper |
( |
| ) |
|
|
inlinestatic |
Return a null-terminated string consisting of all characters in the category UPPER (i.e., [A-Z]), ordered by increasing character codes.
◆ stringXdigit()
| const char * bdlb::CharType::stringXdigit |
( |
| ) |
|
|
inlinestatic |
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()
| char bdlb::CharType::toLower |
( |
char |
input | ) |
|
|
inlinestatic |
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()
| char bdlb::CharType::toUpper |
( |
char |
input | ) |
|
|
inlinestatic |
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.
The documentation for this struct was generated from the following file: