1 '\" te 2 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org> 3 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved 4 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at 5 .\" http://www.opengroup.org/bookstore/. 6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. 7 .\" This notice shall appear on any product containing this material. 8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. 9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. 10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 11 .TH ISWCTYPE 3C "Jul 26, 2014" 12 .SH NAME 13 iswctype \- test character for specified class 14 .SH SYNOPSIS 15 .LP 16 .nf 17 #include <wchar.h> 18 19 \fBint\fR \fBiswctype\fR(\fBwint_t\fR \fIwc\fR, \fBwctype_t\fR \fIcharclass\fR); 20 .fi 21 .LP 22 .nf 23 \fBint\fR \fBiswctype\fR(\fBwint_t\fR \fIwc\fR, \fBwctype_t\fR \fIcharclass\fR, \fBlocale_t\fR \fIloc\fR); 24 .fi 25 26 .SH DESCRIPTION 27 .LP 28 The 29 .B iswctype() 30 and 31 .B iswctype_l() 32 functions determine whether the wide-character code 33 .I wc 34 is a member of the character class 35 .IR charclass , 36 returning 37 .B TRUE 38 or 39 .BR FALSE . 40 These functions are defined on 41 .B WEOF 42 and wide-character codes corresponding to the valid character encodings in the 43 current locale (or 44 .I loc 45 for 46 .BR iswctype_l() .) 47 If the 48 .I wc 49 argument is not in the domain of the function, 50 the result is undefined. If the value of 51 .I charclass 52 is invalid (that is, 53 not obtained by a call to 54 .B wctype (3C) 55 or obtained from a different locale), the result is indeterminate. 56 .LP 57 Whereas 58 .B iswctype() 59 operates in the current locale, 60 .B iswctype_l() 61 operates in the locale specified with 62 .IR loc . 63 .SH RETURN VALUES 64 .LP 65 These functions return 66 .B 0 67 for 68 .B FALSE 69 and non-zero for 70 .BR TRUE . 71 .SH USAGE 72 .LP 73 There are twelve strings that are reserved for the standard character classes: 74 .TS 75 box; 76 l | l | l . 77 "alnum" "alpha" "blank" 78 _ 79 "cntrl" "digit" "graph" 80 _ 81 "lower" "print" "punct" 82 _ 83 "space" "upper" "xdigit" 84 .TE 85 86 .LP 87 In the table below, the functions in the left column are equivalent to the 88 functions in the right column. 89 .TS 90 box; 91 l | l . 92 \fBiswalnum\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("alnum")) 93 \fBiswalpha\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("alpha")) 94 \fBiswcntrl\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("cntrl")) 95 \fBiswdigit\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("digit")) 96 \fBiswgraph\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("graph")) 97 \fBiswlower\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("lower")) 98 \fBiswprint\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("print")) 99 \fBiswpunct\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("punct")) 100 \fBiswspace\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("space")) 101 \fBiswupper\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("upper")) 102 \fBiswxdigit\fR(\fIwc\fR) \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("xdigit")) 103 .TE 104 105 .LP 106 The call 107 .LP 108 \fBiswctype\fR(\fIwc\fR, \fBwctype\fR("blank")) 109 .LP 110 does not have an equivalent \fBisw*(\|)\fR function. 111 .SH ATTRIBUTES 112 .LP 113 See 114 .BR attributes (5) 115 for descriptions of the following attributes: 116 .TS 117 box; 118 c | c 119 l | l . 120 ATTRIBUTE TYPE ATTRIBUTE VALUE 121 _ 122 CSI Enabled 123 _ 124 Interface Stability Standard 125 _ 126 MT-Level MT-Safe 127 .TE 128 129 .SH SEE ALSO 130 .LP 131 .BR iswalpha (3C), 132 .BR newlocale (3C), 133 .BR setlocale (3C), 134 .BR uselocale (3C), 135 .BR wctype (3C), 136 .BR attributes (5), 137 .BR standards (5)