xref: /freebsd/lib/libc/locale/ctype.3 (revision dc36d6f9bb1753f3808552f3afd30eda9a7b206a)
1.\" Copyright (c) 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd April 3, 2022
29.Dt CTYPE 3
30.Os
31.Sh NAME
32.Nm digittoint ,
33.Nm isalnum ,
34.Nm isalpha ,
35.Nm isascii ,
36.Nm isblank ,
37.Nm iscntrl ,
38.Nm isdigit ,
39.Nm isgraph ,
40.Nm ishexnumber ,
41.Nm isideogram ,
42.Nm islower ,
43.Nm isnumber ,
44.Nm isphonogram ,
45.Nm isprint ,
46.Nm ispunct ,
47.Nm isrune ,
48.Nm isspace ,
49.Nm isspecial ,
50.Nm isupper ,
51.Nm isxdigit ,
52.Nm toascii ,
53.Nm tolower ,
54.Nm toupper
55.Nd character classification functions
56.Sh LIBRARY
57.Lb libc
58.Sh SYNOPSIS
59.In ctype.h
60.Ft int
61.Fn digittoint "int c"
62.Ft int
63.Fn isalnum "int c"
64.Ft int
65.Fn isalpha "int c"
66.Ft int
67.Fn isascii "int c"
68.Ft int
69.Fn iscntrl "int c"
70.Ft int
71.Fn isdigit "int c"
72.Ft int
73.Fn isgraph "int c"
74.Ft int
75.Fn ishexnumber "int c"
76.Ft int
77.Fn isideogram "int c"
78.Ft int
79.Fn islower "int c"
80.Ft int
81.Fn isnumber "int c"
82.Ft int
83.Fn isphonogram "int c"
84.Ft int
85.Fn isspecial "int c"
86.Ft int
87.Fn isprint "int c"
88.Ft int
89.Fn ispunct "int c"
90.Ft int
91.Fn isrune "int c"
92.Ft int
93.Fn isspace "int c"
94.Ft int
95.Fn isupper "int c"
96.Ft int
97.Fn isxdigit "int c"
98.Ft int
99.Fn toascii "int c"
100.Ft int
101.Fn tolower "int c"
102.Ft int
103.Fn toupper "int c"
104.Sh DESCRIPTION
105The above functions perform character tests and conversions on the integer
106.Fa c .
107They are available as macros, defined in the include file
108.In ctype.h ,
109or as true functions in the C library.
110See the specific manual pages for more information.
111.Sh SEE ALSO
112.Xr digittoint 3 ,
113.Xr isalnum 3 ,
114.Xr isalpha 3 ,
115.Xr isascii 3 ,
116.Xr isblank 3 ,
117.Xr iscntrl 3 ,
118.Xr isdigit 3 ,
119.Xr isgraph 3 ,
120.Xr isideogram 3 ,
121.Xr islower 3 ,
122.Xr isphonogram 3 ,
123.Xr isprint 3 ,
124.Xr ispunct 3 ,
125.Xr isrune 3 ,
126.Xr isspace 3 ,
127.Xr isspecial 3 ,
128.Xr isupper 3 ,
129.Xr isxdigit 3 ,
130.Xr toascii 3 ,
131.Xr tolower 3 ,
132.Xr toupper 3 ,
133.Xr wctype 3 ,
134.Xr ascii 7
135.Sh STANDARDS
136These functions, except for
137.Fn digittoint ,
138.Fn isascii ,
139.Fn ishexnumber ,
140.Fn isideogram ,
141.Fn isnumber ,
142.Fn isphonogram ,
143.Fn isrune ,
144.Fn isspecial
145and
146.Fn toascii ,
147conform to
148.St -isoC .
149.Sh HISTORY
150The functions
151.Fn isalpha ,
152.Fn isupper ,
153.Fn islower ,
154.Fn isdigit ,
155.Fn isalnum ,
156.Fn isspace ,
157.Fn ispunct ,
158.Fn isprint ,
159.Fn iscntrl ,
160and
161.Fn isascii
162first appeared in
163.At v7 .
164