]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/isalpha.3
Automated addition of parentheses by add_parens_for_own_funcs.sh
[thirdparty/man-pages.git] / man3 / isalpha.3
CommitLineData
fea681da
MK
1.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
11.\"
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
19.\"
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\" License.
23.\"
24.\" Modified Sat Jul 24 19:10:00 1993 by Rik Faith (faith@cs.unc.edu)
25.\" Modified Sun Aug 21 17:51:50 1994 by Rik Faith (faith@cs.unc.edu)
26.\" Modified Sat Sep 2 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
27.\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de)
28.\"
29.TH ISALPHA 3 1995-09-02 "GNU" "Linux Programmer's Manual"
30.SH NAME
31isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
32isprint, ispunct, isspace, isupper, isxdigit \- character
33classification routines
34.SH SYNOPSIS
35.nf
36.B #include <ctype.h>
37.sp
38.BI "int isalnum(int " "c" );
39.nl
40.BI "int isalpha(int " "c" );
41.nl
42.BI "int isascii(int " "c" );
43.nl
44.BI "int isblank(int " "c" );
45.nl
46.BI "int iscntrl(int " "c" );
47.nl
48.BI "int isdigit(int " "c" );
49.nl
50.BI "int isgraph(int " "c" );
51.nl
52.BI "int islower(int " "c" );
53.nl
54.BI "int isprint(int " "c" );
55.nl
56.BI "int ispunct(int " "c" );
57.nl
58.BI "int isspace(int " "c" );
59.nl
60.BI "int isupper(int " "c" );
61.nl
62.BI "int isxdigit(int " "c" );
63.fi
64.SH DESCRIPTION
65These functions check whether
66.IR c ,
67which must have the value of an
68.B unsigned char
69or
70.BR EOF ,
71falls into a certain character class according to the current locale.
72.TP
73.B "isalnum()"
74checks for an alphanumeric character; it is equivalent to
75.BI "(isalpha(" c ") || isdigit(" c "))" \fR.
76.TP
77.B "isalpha()"
78checks for an alphabetic character; in the standard \fB"C"\fP
79locale, it is equivalent to
80.BI "(isupper(" c ") || islower(" c "))" \fR.
81In some locales, there may be additional characters for which
82.B isalpha()
2bc2f479 83is true\(emletters which are neither upper case nor lower
fea681da
MK
84case.
85.TP
86.B "isascii()"
87checks whether \fIc\fP is a 7-bit
88.I unsigned char
89value that fits into
90the ASCII character set. This function is a BSD extension
91and is also an SVID extension.
92.TP
93.B "isblank()"
94checks for a blank character; that is, a space or a tab.
95.TP
96.B "iscntrl()"
97checks for a control character.
98.TP
99.B "isdigit()"
100checks for a digit (0 through 9).
101.TP
102.B "isgraph()"
103checks for any printable character except space.
104.TP
105.B "islower()"
106checks for a lower-case character.
107.TP
108.B "isprint()"
109checks for any printable character including space.
110.TP
111.B "ispunct()"
112checks for any printable character which is not a space or an
113alphanumeric character.
114.TP
115.B "isspace()"
116checks for white-space characters. In the
117.B """C"""
118and
119.B """POSIX"""
120locales, these are: space, form-feed
121.RB ( '\ef' ),
122newline
123.RB ( '\en' ),
124carriage return
125.RB ( '\er' ),
126horizontal tab
127.RB ( '\et' ),
128and vertical tab
129.RB ( '\ev' ).
130.TP
131.B "isupper()"
132checks for an uppercase letter.
133.TP
134.B "isxdigit()"
135checks for a hexadecimal digits, i.e. one of
136.nl
137.BR "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F" .
138.SH "RETURN VALUE"
f59a3f19 139The values returned are non-zero if the character
fea681da
MK
140.I c
141falls into the tested class, and a zero value
142if not.
143.SH "CONFORMING TO"
b14d4aa5 144ANSI-C, 4.3BSD.
fea681da
MK
145\fBisascii()\fP is a BSD extension
146and is also an SVID extension.
147\fBisblank()\fP conforms to ISO C99 7.4.1.3.
148.SH NOTE
149The details of what characters belong into which class depend on the current
150locale. For example,
151.B isupper()
c65433e6 152will not recognize an A-umlaut (\(:A) as an uppercase letter in the default
fea681da
MK
153.B "C"
154locale.
155.SH "SEE ALSO"
156.BR setlocale (3),
157.BR tolower (3),
158.BR toupper (3),
159.BR ascii (7),
160.BR locale (7)