1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
.TH CTYPE 3
.CT 2 data_man
.SH NAME
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii \(mi character classification
.SH SYNOPSIS
.2C
.B #include <ctype.h>
.PP
.B isalpha(c)
.PP
.B isupper(c)
.PP
.B islower(c)
.PP
.B isdigit(c)
.PP
.B isxdigit(c)
.PP
.B isalnum(c)
.PP
.B isspace(c)
.PP
.B ispunct(c)
.PP
.B isprint(c)
.PP
.B isgraph(c)
.PP
.B iscntrl(c)
.PP
.B isascii(c)
.1C
.SH DESCRIPTION
These macros classify ASCII-coded integer values
by table lookup.
Each is a predicate returning nonzero for true,
zero for false.
.I Isascii
is defined on all integer values; the rest
are defined only where
.I isascii
is true and on the single non-ASCII value
.BR EOF ;
.IR stdio (3).
.TP "\w'isalnum 'u"
.I isalpha
.I c
is a letter, a-z or A-Z
.TP
.I isupper
.I c
is an upper case letter, A-Z
.TP
.I islower
.I c
is a lower case letter, a-z
.TP
.I isdigit
.I c
is a digit, 0-9
.TP
.I isxdigit
.I c
is a hexadecimal digit, 0-9 or a-f or A-F
.TP
.I isalnum
.I c
is an alphanumeric character, a-z or A-Z or 0-9
.TP
.I isspace
.I c
is a space, horizontal tab, vertical tab, carriage return, newline, or formfeed
(040, 011, 012, 013, 014, 015)
.TP
.I ispunct
.I c
is a punctuation character
(one of
.L
!"#$%&'()*+,-./:;<=>?@[\e]^_`{|}~\fR)
.TP
.I isprint
.I c
is a printing character, 040 (space)
through 0176 (tilde)
.TP
.I isgraph
.I c
is a visible printing character, 041 (exclamation) through 0176
(tilde)
.TP
.I iscntrl
.I c
is a delete character, 0177,
or ordinary control character, 000 through 037
.TP
.I isascii
.I c
is an ASCII character, 000 through 0177
.SH "SEE ALSO"
.IR tolower (3),
.IR ascii (6)
|