xref: /openbsd/lib/libc/locale/iswalnum.3 (revision 73471bf0)
1.\"	$OpenBSD: iswalnum.3,v 1.6 2017/09/05 03:16:13 schwarze Exp $
2.\"	$NetBSD: iswalnum.3,v 1.8 2003/09/08 17:54:31 wiz Exp $
3.\"
4.\" Copyright (c) 1991 The Regents of the University of California.
5.\" All rights reserved.
6.\"
7.\" This code is derived from software contributed to Berkeley by
8.\" the American National Standards Committee X3, on Information
9.\" Processing Systems.
10.\"
11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions
13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright
15.\"    notice, this list of conditions and the following disclaimer.
16.\" 2. Redistributions in binary form must reproduce the above copyright
17.\"    notice, this list of conditions and the following disclaimer in the
18.\"    documentation and/or other materials provided with the distribution.
19.\" 3. Neither the name of the University nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\"     @(#)isalnum.3	5.2 (Berkeley) 6/29/91
36.\"
37.Dd $Mdocdate: September 5 2017 $
38.Dt ISWALNUM 3
39.Os
40.Sh NAME
41.Nm iswalnum ,
42.Nm iswalnum_l ,
43.Nm iswalpha ,
44.Nm iswalpha_l ,
45.Nm iswblank ,
46.Nm iswblank_l ,
47.Nm iswcntrl ,
48.Nm iswcntrl_l ,
49.Nm iswdigit ,
50.Nm iswdigit_l ,
51.Nm iswgraph ,
52.Nm iswgraph_l ,
53.Nm iswlower ,
54.Nm iswlower_l ,
55.Nm iswprint ,
56.Nm iswprint_l ,
57.Nm iswpunct ,
58.Nm iswpunct_l ,
59.Nm iswspace ,
60.Nm iswspace_l ,
61.Nm iswupper ,
62.Nm iswupper_l ,
63.Nm iswxdigit ,
64.Nm iswxdigit_l
65.Nd wide-character classification utilities
66.Sh SYNOPSIS
67.In wctype.h
68.Ft int
69.Fn iswalnum "wint_t wc"
70.Ft int
71.Fn iswalnum_l "wint_t wc" "locale_t locale"
72.Ft int
73.Fn iswalpha "wint_t wc"
74.Ft int
75.Fn iswalpha_l "wint_t wc" "locale_t locale"
76.Ft int
77.Fn iswblank "wint_t wc"
78.Ft int
79.Fn iswblank_l "wint_t wc" "locale_t locale"
80.Ft int
81.Fn iswcntrl "wint_t wc"
82.Ft int
83.Fn iswcntrl_l "wint_t wc" "locale_t locale"
84.Ft int
85.Fn iswdigit "wint_t wc"
86.Ft int
87.Fn iswdigit_l "wint_t wc" "locale_t locale"
88.Ft int
89.Fn iswgraph "wint_t wc"
90.Ft int
91.Fn iswgraph_l "wint_t wc" "locale_t locale"
92.Ft int
93.Fn iswlower "wint_t wc"
94.Ft int
95.Fn iswlower_l "wint_t wc" "locale_t locale"
96.Ft int
97.Fn iswprint "wint_t wc"
98.Ft int
99.Fn iswprint_l "wint_t wc" "locale_t locale"
100.Ft int
101.Fn iswpunct "wint_t wc"
102.Ft int
103.Fn iswpunct_l "wint_t wc" "locale_t locale"
104.Ft int
105.Fn iswspace "wint_t wc"
106.Ft int
107.Fn iswspace_l "wint_t wc" "locale_t locale"
108.Ft int
109.Fn iswupper "wint_t wc"
110.Ft int
111.Fn iswupper_l "wint_t wc" "locale_t locale"
112.Ft int
113.Fn iswxdigit "wint_t wc"
114.Ft int
115.Fn iswxdigit_l "wint_t wc" "locale_t locale"
116.Sh DESCRIPTION
117The functions are character classification utility functions,
118for use with wide characters
119.Po
120.Fa wchar_t
121or
122.Fa wint_t
123.Pc .
124See the description of singlebyte classification functions, like
125.Xr isalnum 3 ,
126for details.
127.Pp
128The two-argument variants use the specified
129.Fa locale ,
130while the others use the thread-specific locale set with
131.Xr uselocale 3 ,
132falling back to the global locale set with
133.Xr setlocale 3 .
134.Sh RETURN VALUES
135The functions return zero if the character tests false and
136return non-zero if the character tests true.
137.Sh SEE ALSO
138.Xr isalnum 3 ,
139.Xr isalpha 3 ,
140.Xr isblank 3 ,
141.Xr iscntrl 3 ,
142.Xr isdigit 3 ,
143.Xr isgraph 3 ,
144.Xr islower 3 ,
145.Xr isprint 3 ,
146.Xr ispunct 3 ,
147.Xr isspace 3 ,
148.Xr isupper 3 ,
149.Xr iswctype 3 ,
150.Xr isxdigit 3 ,
151.Xr newlocale 3 ,
152.Xr setlocale 3 ,
153.Xr towlower 3
154.Sh STANDARDS
155The one-argument functions conform to
156.St -isoC-99 ,
157the two-argument functions to
158.St -p1003.1-2008 .
159.Sh CAVEATS
160The argument
161.Fa wc
162must be
163.Dv WEOF
164or a valid
165.Fa wchar_t
166value with the current locale; otherwise, the result is undefined.
167