1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified Sat Jul 24 19:10:00 1993 by Rik Faith (faith@cs.unc.edu)
26 .\" Modified Sun Aug 21 17:51:50 1994 by Rik Faith (faith@cs.unc.edu)
27 .\" Modified Sat Sep 2 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
28 .\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de)
30 .TH ISALPHA 3 2010-09-20 "GNU" "Linux Programmer's Manual"
32 isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
33 isprint, ispunct, isspace, isupper, isxdigit \- character
34 classification routines
39 .BI "int isalnum(int " "c" );
41 .BI "int isalpha(int " "c" );
43 .BI "int isascii(int " "c" );
45 .BI "int isblank(int " "c" );
47 .BI "int iscntrl(int " "c" );
49 .BI "int isdigit(int " "c" );
51 .BI "int isgraph(int " "c" );
53 .BI "int islower(int " "c" );
55 .BI "int isprint(int " "c" );
57 .BI "int ispunct(int " "c" );
59 .BI "int isspace(int " "c" );
61 .BI "int isupper(int " "c" );
63 .BI "int isxdigit(int " "c" );
67 Feature Test Macro Requirements for glibc (see
68 .BR feature_test_macros (7)):
74 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
79 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
80 _POSIX_C_SOURCE\ >=\ 200112L;
87 These functions check whether
89 which must have the value of an
93 falls into a certain character class according to the current locale.
96 checks for an alphanumeric character; it is equivalent to
97 .BI "(isalpha(" c ") || isdigit(" c "))" \fR.
100 checks for an alphabetic character; in the standard \fB"C"\fP
101 locale, it is equivalent to
102 .BI "(isupper(" c ") || islower(" c "))" \fR.
103 In some locales, there may be additional characters for which
105 is true\(emletters which are neither upper case nor lower
109 checks whether \fIc\fP is a 7-bit
112 the ASCII character set.
115 checks for a blank character; that is, a space or a tab.
118 checks for a control character.
121 checks for a digit (0 through 9).
124 checks for any printable character except space.
127 checks for a lower-case character.
130 checks for any printable character including space.
133 checks for any printable character which is not a space or an
134 alphanumeric character.
137 checks for white-space characters.
142 locales, these are: space, form-feed
154 checks for an uppercase letter.
157 checks for a hexadecimal digits, that is, one of
159 .BR "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F" .
161 The values returned are nonzero if the character
163 falls into the tested class, and a zero value
167 C89 specifies all of these functions except
173 and is also an SVr4 extension.
175 conforms to POSIX.1-2001 and C99 7.4.1.3.
179 noting that it cannot be used portably in a localized application.
181 The details of what characters belong into which class depend on the current
185 will not recognize an A-umlaut (\(:A) as an uppercase letter in the default