ctype(3)
NAME
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii, toascii − character classification macros
SYNTAX
#include <ctype.h>
isalpha(c)
. . .
DESCRIPTION
These macros classify character-coded integer values according to the rules of the coded character set (codeset) identified by the last successful call to setlocale category LC_CTYPE. All macros return non-zero for true and zero for false.
If setlocale category LC_CTYPE has not been called successfully, or if character classification information is not available for a supported language, then characters are classified according to the rules of the ASCII 7-bit coded character set, returning 0 for values above octal 0177.
The macro isascii provides a result for all integer values. The rest provide a result for EOF and values in the character range of the codeset identified by the last successful call to setlocale category LC_CTYPE.
isalpha c is a letter
isupper c is an uppercase letter
islower c is a lowercase letter
isdigit c is a digit
isxdigit c is a hexadecimal digit [0-9], [A-F], or [a-f]
isalnum c is an alphanumeric character
isspace c is a space, tab, carriage return, new line, or formfeed
ispunct c is a punctuation character (neither control, alphanumeric, nor space)
isprint c is a printing character, code 040 (space) through 0176 (tilde)
isgraph c is a printing character, like isprint except false for space
iscntrl c is a delete character (0177) or ordinary control character (less than 040) except for space characters
isascii c is an ASCII character, code less than 0200
SEE ALSO
setlocale(3int), stdio(3s), ascii(7)
Subroutines