The header <ctype.h> declares several functions useful for testing and mapping characters. In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall be equal to the value of the macro EOF. If the argument has any other value, the behavior is undefined.
The behavior of these functions is effected by the current locale[1]. Those functions that have implementation-defined aspects only when not in the "C" locale are noted below.
The term printing character refers to a member of an implementation-defined set of characters, each of which occupies one printing position on a display device: the term control character refers to a member of an implementation-defined set of characters that are not printing characters.
All the character testing functions are defined as macros that test one or more bits in a constant array indexed by the given character, which must be in the range -1 to 255. |
[1] |
The current locale is always the C locale. |