xref: /openbsd/lib/libc/locale/iswctype.3 (revision 4cfece93)
1.\" $OpenBSD: iswctype.3,v 1.5 2017/09/05 03:16:13 schwarze Exp $
2.\" $NetBSD: iswctype.3,v 1.5 2003/04/16 13:34:40 wiz Exp $
3.\"
4.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
5.\" Copyright (c) 2003 Citrus Project
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.Dd $Mdocdate: September 5 2017 $
30.Dt ISWCTYPE 3
31.Os
32.Sh NAME
33.Nm iswctype ,
34.Nm iswctype_l
35.Nd test whether a wide character belongs to a character class
36.Sh SYNOPSIS
37.In wctype.h
38.Ft int
39.Fn iswctype "wint_t wc" "wctype_t charclass"
40.Ft int
41.Fn iswctype_l "wint_t wc" "wctype_t charclass" "locale_t locale"
42.Sh DESCRIPTION
43These functions test whether the wide character
44.Fa wc
45belongs to
46.Fa charclass .
47.Pp
48The behaviour is undefined if
49.Fa charclass
50or
51.Fa wc
52is invalid.
53When
54.Fa charclass
55is retrieved with
56.Xr wctype 3 ,
57it becomes invalid when the thread-specific character encoding locale
58is changed with
59.Xr uselocale 3
60or when the global character encoding locale is changed with
61.Xr setlocale 3 .
62When
63.Fa charclass
64is retrieved with
65.Xr wctype_l 3 ,
66it is only valid for use with the same
67.Fa locale
68argument.
69.Sh RETURN VALUES
70These functions return zero if the character tests false
71or non-zero if the character tests true.
72.Sh SEE ALSO
73.Xr iswalnum 3 ,
74.Xr newlocale 3 ,
75.Xr setlocale 3 ,
76.Xr towctrans 3 ,
77.Xr wctype 3
78.Sh STANDARDS
79The
80.Fn iswctype
81function conforms to
82.St -isoC-amd1 ,
83and
84.Fn iswctype_l
85to
86.St -p1003.1-2008 .
87.Sh HISTORY
88The
89.Fn iswctype
90function has been available since
91.Ox 3.8 ,
92and
93.Fn iswctype_l
94since
95.Ox 6.2 .
96