ctype_base class — Base class for ctype facet
class ctype_base{ public: enum mask { space, print, cntrl, upper, lower, alpha, digit, punct, xdigit, alnum=alpha|digit, graph=alnum|punct }; };
The ctype_base
class is the
base class for the ctype
and
ctype_byname
class templates. It
declares the mask
enumerated
type, which is used for classifying characters. Table 13-20 describes the
mask
literals and their
definitions for the classic "C
"
locale.
Table 13-20. mask literals for classifying characters
Literal | Description | "C" locale |
---|---|---|
| Alphabetic (a letter) | |
| Alphanumeric (letter or digit) | |
| Control (nonprintable) | Not |
| ' | All locales |
| Character that occupies graphical space | |
| Lowercase letter | ' |
| Printable character (alphanumeric, punctuation, space, etc.) | Depends on character set; in ASCII: ' |
| Whitespace | ' |
| Uppercase letter | ' |
| Hexadecimal digit (' | All locales |