This chapter groups macros (which are also available as subroutines) to classify characters into several categories (alphabetic, numeric, control characters, whitespace, and so on), or to perform simple character mappings.
The header file ctype.h defines the macros.
isalnum
, isalnum_l
—alphanumeric character predicateisalpha
, isalpha_l
—alphabetic character predicateisascii
, isascii_l
—ASCII character predicateisblank
, isblank_l
—blank character predicateiscntrl
, iscntrl_l
—control character predicateisdigit
, isdigit_l
—decimal digit predicateislower
, islower_l
—lowercase character predicateisprint
, isgraph
, isprint_l
, isgraph_l
—printable character predicatesispunct
, ispunct_l
—punctuation character predicateisspace
, isspace_l
—whitespace character predicateisupper
, isupper_l
—uppercase character predicateisxdigit
, isxdigit_l
—hexadecimal digit predicatetoascii
, toascii_l
—force integers to ASCII rangetolower
, tolower_l
—translate characters to lowercasetoupper
, toupper_l
—translate characters to uppercaseiswalnum
, iswalnum_l
—alphanumeric wide character testiswalpha
, iswalpha_l
—alphabetic wide character testiswcntrl
, iswcntrl_l
—control wide character testiswblank
, iswblank_l
—blank wide character testiswdigit
, iswdigit_l
—decimal digit wide character testiswgraph
, iswgraph_l
—graphic wide character testiswlower
, iswlower_l
—lowercase wide character testiswprint
, iswprint_l
—printable wide character testiswpunct
, iswpunct_l
—punctuation wide character testiswspace
, iswspace_l
—whitespace wide character testiswupper
, iswupper_l
—uppercase wide character testiswxdigit
, iswxdigit_l
—hexadecimal digit wide character testiswctype
, iswctype_l
—extensible wide-character testwctype
, wctype_l
—get wide-character classification typetowlower
, towlower_l
—translate wide characters to lowercasetowupper
, towupper_l
—translate wide characters to uppercasetowctrans
, towctrans_l
—extensible wide-character translationwctrans
, wctrans_l
—get wide-character translation type