xref: /original-bsd/lib/libc/locale/ctype.3 (revision c6ba4462)
@(#)ctype.3 6.1 (Berkeley) 05/15/85

CTYPE 3 ""
.AT 3
NAME
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, iscntrl, isascii - character classification macros
SYNOPSIS
#include <ctype.h>

isalpha(c)

. . .

DESCRIPTION
These macros classify ASCII-coded integer values by table lookup. Each is a predicate returning nonzero for true, zero for false. Isascii is defined on all integer values; the rest are defined only where isascii is true and on the single non-ASCII value EOF (see stdio (3S)).

15n isalpha c is a letter

isupper c is an upper case letter

islower c is a lower case letter

isdigit c is a digit

isxdigit c is a hex digit

isalnum c is an alphanumeric character

isspace c is a space, tab, carriage return, newline, vertical tab, or formfeed

ispunct c is a punctuation character (neither control nor alphanumeric)

isprint c is a printing character, code 041(8) (exclamation point) through 0176 (tilde)

iscntrl c is a delete character (0177) or ordinary control character (less than 040 and not isspace(c)).

isascii c is an ASCII character, code less than 0200

"SEE ALSO"
ascii(7)