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(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
30       isblank(): _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE; or cc -std=c99
31

DESCRIPTION

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

RETURN VALUE

87       The values returned are non-zero if the  character  c  falls  into  the
88       tested class, and a zero value if not.
89

CONFORMING TO

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

NOTES

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

SEE ALSO

103       iswalnum(3),  iswalpha(3),  iswblank(3), iswcntrl(3), iswdigit(3), isw‐
104       graph(3), iswlower(3), iswprint(3),  iswpunct(3),  iswspace(3),  iswup‐
105       per(3), iswxdigit(3), setlocale(3), toascii(3), tolower(3), toupper(3),
106       ascii(7), locale(7)
107

COLOPHON

109       This page is part of release 3.22 of the Linux  man-pages  project.   A
110       description  of  the project, and information about reporting bugs, can
111       be found at http://www.kernel.org/doc/man-pages/.
112
113
114
115GNU                               2009-03-15                        ISALPHA(3)
Impressum