1ISALPHA(3)                 Linux Programmer's Manual                ISALPHA(3)
2
3
4

NAME

6       isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
7       isprint, ispunct, isspace, isupper, isxdigit - character classification
8       routines
9

SYNOPSIS

11       #include <ctype.h>
12
13       int isalnum(int c);
14       int isalpha(int c);
15       int isascii(int c);
16       int isblank(int c);
17       int iscntrl(int c);
18       int isdigit(int c);
19       int isgraph(int c);
20       int islower(int c);
21       int isprint(int c);
22       int ispunct(int c);
23       int isspace(int c);
24       int isupper(int c);
25       int isxdigit(int c);
26
27   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
28
29       isascii():
30           _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
31       isblank():
32           _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE ||
33           _POSIX_C_SOURCE >= 200112L;
34           or cc -std=c99
35

DESCRIPTION

37       These functions check whether c,  which  must  have  the  value  of  an
38       unsigned char or EOF, falls into a certain character class according to
39       the current locale.
40
41       isalnum()
42              checks for an alphanumeric character; it is equivalent to (isal‐
43              pha(c) || isdigit(c)).
44
45       isalpha()
46              checks  for an alphabetic character; in the standard "C" locale,
47              it  is  equivalent  to  (isupper(c)  ||  islower(c)).   In  some
48              locales,  there may be additional characters for which isalpha()
49              is true—letters which are neither upper case nor lower case.
50
51       isascii()
52              checks whether c is a 7-bit unsigned char value that  fits  into
53              the ASCII character set.
54
55       isblank()
56              checks for a blank character; that is, a space or a tab.
57
58       iscntrl()
59              checks for a control character.
60
61       isdigit()
62              checks for a digit (0 through 9).
63
64       isgraph()
65              checks for any printable character except space.
66
67       islower()
68              checks for a lower-case character.
69
70       isprint()
71              checks for any printable character including space.
72
73       ispunct()
74              checks  for  any  printable character which is not a space or an
75              alphanumeric character.
76
77       isspace()
78              checks for white-space  characters.   In  the  "C"  and  "POSIX"
79              locales,  these  are:  space,  form-feed ('\f'), newline ('\n'),
80              carriage return ('\r'), horizontal tab ('\t'), and vertical  tab
81              ('\v').
82
83       isupper()
84              checks for an uppercase letter.
85
86       isxdigit()
87              checks for a hexadecimal digits, that is, one of
88              0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.
89

RETURN VALUE

91       The  values  returned  are  nonzero  if  the character c falls into the
92       tested class, and a zero value if not.
93

CONFORMING TO

95       C99, 4.3BSD.  C89 specifies all of these functions except isascii() and
96       isblank().  isascii() is a BSD extension and is also an SVr4 extension.
97       isblank() conforms to POSIX.1-2001 and C99 7.4.1.3.  POSIX.1-2008 marks
98       isascii()  as  obsolete,  noting  that  it cannot be used portably in a
99       localized application.
100

NOTES

102       The details of what characters belong into which class  depend  on  the
103       current  locale.  For example, isupper() will not recognize an A-umlaut
104       (Ä) as an uppercase letter in the default C locale.
105

SEE ALSO

107       iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3),  iswdigit(3),  isw‐
108       graph(3),  iswlower(3),  iswprint(3),  iswpunct(3), iswspace(3), iswup‐
109       per(3), iswxdigit(3), setlocale(3), toascii(3), tolower(3), toupper(3),
110       ascii(7), locale(7)
111

COLOPHON

113       This  page  is  part of release 3.53 of the Linux man-pages project.  A
114       description of the project, and information about reporting  bugs,  can
115       be found at http://www.kernel.org/doc/man-pages/.
116
117
118
119GNU                               2010-09-20                        ISALPHA(3)
Impressum