Commit | Line | Data |
---|---|---|
b54f16c2 | 1 | .\" @(#)ctype.3 5.1 (Berkeley) %G% |
ec009048 | 2 | .\" |
b54f16c2 | 3 | .TH CTYPE 3 "25 February 1983" |
ec009048 KM |
4 | .AT 3 |
5 | .SH NAME | |
b54f16c2 | 6 | isalpha, isupper, islower, isdigit, isalnum, isspace, ispunct, isprint, iscntrl, isascii \- character classification macros |
ec009048 KM |
7 | .SH SYNOPSIS |
8 | .B #include <ctype.h> | |
9 | .PP | |
10 | .B isalpha(c) | |
11 | .PP | |
12 | .B . . . | |
13 | .SH DESCRIPTION | |
14 | These macros classify ASCII-coded integer values | |
15 | by table lookup. | |
16 | Each is a predicate returning nonzero for true, | |
17 | zero for false. | |
18 | .I Isascii | |
19 | is defined on all integer values; the rest | |
20 | are defined only where | |
21 | .I isascii | |
22 | is true and on the single non-ASCII value | |
23 | EOF (see | |
b54f16c2 | 24 | .IR stdio (3S)). |
ec009048 KM |
25 | .TP 15n |
26 | .I isalpha | |
27 | .I c | |
28 | is a letter | |
29 | .TP | |
30 | .I isupper | |
31 | .I c | |
32 | is an upper case letter | |
33 | .TP | |
34 | .I islower | |
35 | .I c | |
36 | is a lower case letter | |
37 | .TP | |
38 | .I isdigit | |
39 | .I c | |
40 | is a digit | |
41 | .TP | |
42 | .I isalnum | |
43 | .I c | |
44 | is an alphanumeric character | |
45 | .TP | |
46 | .I isspace | |
47 | .I c | |
48 | is a space, tab, carriage return, newline, or formfeed | |
49 | .TP | |
50 | .I ispunct | |
51 | .I c | |
52 | is a punctuation character (neither control nor alphanumeric) | |
53 | .TP | |
54 | .I isprint | |
55 | .I c | |
56 | is a printing character, code 040(8) (space) through 0176 (tilde) | |
57 | .TP | |
58 | .I iscntrl | |
59 | .I c | |
60 | is a delete character (0177) or ordinary control character | |
61 | (less than 040). | |
62 | .TP | |
63 | .I isascii | |
64 | .I c | |
65 | is an ASCII character, code less than 0200 | |
66 | .SH "SEE ALSO" | |
67 | ascii(7) |