CTYPE(3)
NAME
ctype − character type predicates and manipulation routines
SYNOPSIS
#include <ctype.h>
isalpha(c)
...
toascii(c)
tolower(c)
toupper(c)
char c;
DESCRIPTION
Routines beginning with is are predicates that classify the type of a character. Routines beginning with to convert characters. Each predicate returns TRUE if the condition is satisfied, and FALSE otherwise. In the current implementation, predicates are macros that use table lookup for efficiency.
isalnum c is an alphanumeric character (i.e., a letter or digit)
isalpha c is a lower- or upper-case letter
isascii c is an ASCII character, code less than 0200
iscntrl c has a value less than octal 040 or is a DEL (octal value 0177).
isdigit c is a digit.
islower c is a lower case letter.
isprint c is a printable character with octal value 040 (blank) through 0176 (tilde).
isprshort c is a printable short.
ispunct c is a punctuation character (neither control nor alphanumeric).
isspace c is a space, tab, carriage return, newline, or formfeed.
isupper c is an upper case letter.
isxdigit c is a hexadecimal digit (i.e., is 0−9 or a-f).
toascii Converts c to an ascii by turning off high-order bits.
tolower Converts argument c from upper to lower case.
toupper Converts argument c from lower to upper case.
December 01, 1986 — Xinu Programmer’s Manual