1 '\" te
   2 .\"  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   3 .\" 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
   4 .\" http://www.opengroup.org/bookstore/.
   5 .\" 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.
   6 .\"  This notice shall appear on any product containing this material.
   7 .\" 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.
   8 .\" 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.
   9 .\" 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]
  10 .TH ISWCTYPE 3C "Jul 24, 2002"
  11 .SH NAME
  12 iswctype \- test character for specified class
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 #include <wchar.h>
  17 
  18 \fBint\fR \fBiswctype\fR(\fBwint_t\fR \fIwc\fR, \fBwctype_t\fR \fIcharclass\fR);
  19 .fi
  20 
  21 .SH DESCRIPTION
  22 .sp
  23 .LP
  24 The \fBiswctype()\fR function determines whether the wide-character code
  25 \fIwc\fR has the character class \fIcharclass\fR, returning \fBTRUE\fR or
  26 \fBFALSE\fR. The \fBiswctype()\fR function is defined on \fBWEOF\fR and
  27 wide-character codes corresponding to the valid character encodings in the
  28 current locale. If the \fIwc\fR argument is not in the domain of the function,
  29 the result is undefined. If the value of \fIcharclass\fR is invalid (that is,
  30 not obtained by a call to \fBwctype\fR(3C) or \fIcharclass \fR is invalidated
  31 by a subsequent call to \fBsetlocale\fR(3C) that has affected category
  32 \fBLC_CTYPE\fR), the result is indeterminate.
  33 .SH RETURN VALUES
  34 .sp
  35 .LP
  36 The \fBiswctype()\fR function returns \fB0\fR for \fBFALSE\fR and non-zero for
  37 \fBTRUE\fR.
  38 .SH USAGE
  39 .sp
  40 .LP
  41 There are twelve strings that are reserved for the standard character classes:
  42 .sp
  43 
  44 .sp
  45 .TS
  46 l | l | l
  47 l | l | l .
  48 "alnum" "alpha" "blank"
  49 _
  50 "cntrl" "digit" "graph"
  51 _
  52 "lower" "print" "punct"
  53 _
  54 "space" "upper" "xdigit"
  55 .TE
  56 
  57 .sp
  58 .LP
  59 In the table below, the functions in the left column are equivalent to the
  60 functions in the right column.
  61 .sp
  62 
  63 .sp
  64 .TS
  65 l l
  66 l l .
  67 \fBiswalnum(\fR\fIwc\fR\fB)\fR  iswctype(\fIwc,\fR\fB wctype(\fR"alnum"\fB))\fR
  68 iswalpha(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"alpha"\fB))\fR
  69 iswcntrl(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"cntrl"\fB))\fR
  70 iswdigit(\fI wc\fR\fB)\fR       iswctype(\fIwc,\fR\fB wctype(\fR"digit"\fB))\fR
  71 iswgraph(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"graph"\fB))\fR
  72 iswlower(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"lower"\fB))\fR
  73 iswprint(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"print"\fB))\fR
  74 iswpunct(\fIwc\fR\fB)\fR        iswctype(\fI wc,\fR\fB wctype(\fR"punct"\fB))\fR
  75 iswspace(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"space"\fB))\fR
  76 iswupper(\fIwc\fR\fB)\fR        iswctype(\fIwc,\fR\fB wctype(\fR"upper"\fB))\fR
  77 iswxdigit(\fIwc\fR\fB)\fR       iswctype(\fIwc,\fR\fB wctype(\fR"xdigit"\fB))\fR
  78 .TE
  79 
  80 .sp
  81 .LP
  82 The call
  83 .sp
  84 .LP
  85 \fBiswctype(\fR\fIwc,\fR\fB wctype(\fR"blank"\fB))\fR
  86 .sp
  87 .LP
  88 does not have an equivalent  \fBisw*(\|)\fR function.
  89 .SH ATTRIBUTES
  90 .sp
  91 .LP
  92 See \fBattributes\fR(5) for descriptions of the following attributes:
  93 .sp
  94 
  95 .sp
  96 .TS
  97 box;
  98 c | c
  99 l | l .
 100 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 101 _
 102 CSI     Enabled
 103 _
 104 Interface Stability     Standard
 105 _
 106 MT-Level        MT-Safe with exceptions
 107 .TE
 108 
 109 .SH SEE ALSO
 110 .sp
 111 .LP
 112 \fBiswalpha\fR(3C), \fBsetlocale\fR(3C), \fBwctype\fR(3C), \fBattributes\fR(5),
 113 \fBenviron\fR(5), \fBstandards\fR(5)