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

DESCRIPTION

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

RETURN VALUE

82       The values returned are non-zero if the  character  c  falls  into  the
83       tested class, and a zero value if not.
84

CONFORMING TO

86       C99, 4.3BSD.  C89 specifies all of these functions except isascii() and
87       isblank().  isascii() is a BSD extension and is also an SVr4 extension.
88       isblank() conforms to POSIX.1-2001 and C99 7.4.1.3.
89

NOTE

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

SEE ALSO

96       iswalnum(3),  iswalpha(3),  iswblank(3), iswcntrl(3), iswdigit(3), isw‐
97       graph(3), iswlower(3), iswprint(3),  iswpunct(3),  iswspace(3),  iswup‐
98       per(3),  iswxdigit(3),  setlocale(3), tolower(3), toupper(3), ascii(7),
99       locale(7)
100
101
102
103GNU                               1995-09-02                        ISALPHA(3)
Impressum