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 |
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.