class ctype_base {
public:
enum mask;
static const mask space, print, cntrl,
upper, lower, digit, punct, xdigit,
alpha, alnum, graph;
};
The class serves as a base class for facets of template class ctype
. It defines just the enumerated type mask
and
several constants of this type. Each of the constants characterizes a different way to classify characters, as defined by
the functions with similar names declared in the header <ctype.h>
. The constants are:
space
(function isspace
)print
(function isprint
)cntrl
(function iscntrl
)upper
(function isupper
)lower
(function islower
)digit
(function isdigit
)punct
(function ispunct
)xdigit
(function isxdigit
)alpha
(function isalpha
)alnum
(function isalnum
)graph
(function isgraph
)You can characterize a combination of classifications by ORing these constants. In particular, it is always true that alnum
== (alpha | digit)
and graph == (alnum | punct)
.