Name
ctype_base class — Base class for ctype facet
Synopsis
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.
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 |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access