Isalpha
Isupper
Islower
Isdigit
Isalnum
Isspace
Ispunct
Isprint
Iscntrl
Isascii
character classification
#include <ctype.h>
isalpha
int c
Description
These functions use table look-up to classify characters
according to their ascii value. The header file defines them
as macros which means that they are implemented as fast, inline
code rather than subroutines.
Each results in non-zero for true or zero for false.
The correct value is guaranteed for all integer values in
isascii, but the result is unpredictable in the others if the
argument is outside the range -1 to 127.
The truth tested by each function is a follows:
isalpha
c is a letter
isdigit
c is a digit
isupper
c is an upper case letter
islower
c is a lower case letter
isalnum
c is a letter or a digit
isspace
c is a space, tab character, newline, carriage return or formfeed
iscntrl
c is a control character (0 to 32) or DEL (127)
ispunct
c is neither countrol nor alpha-numeric
isprint
c is printable (32 to 126)
isascii
c is in the range -1 to 127