summaryrefslogtreecommitdiffstats
path: root/man-pages-posix-2003/man3p/iswctype.3p
diff options
context:
space:
mode:
Diffstat (limited to 'man-pages-posix-2003/man3p/iswctype.3p')
-rw-r--r--man-pages-posix-2003/man3p/iswctype.3p110
1 files changed, 110 insertions, 0 deletions
diff --git a/man-pages-posix-2003/man3p/iswctype.3p b/man-pages-posix-2003/man3p/iswctype.3p
new file mode 100644
index 0000000..b0775a9
--- /dev/null
+++ b/man-pages-posix-2003/man3p/iswctype.3p
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "ISWCTYPE" 3P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" iswctype
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+iswctype \- test character for a specified class
+.SH SYNOPSIS
+.LP
+\fB#include <wctype.h>
+.br
+.sp
+int iswctype(wint_t\fP \fIwc\fP\fB, wctype_t\fP \fIcharclass\fP\fB);
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIiswctype\fP() function shall determine whether the wide-character
+code \fIwc\fP has the character class
+\fIcharclass\fP, returning true or false. The \fIiswctype\fP() function
+is defined on WEOF and wide-character codes corresponding
+to the valid character encodings in the current locale. If the \fIwc\fP
+argument is not in the domain of the function, the result
+is undefined. If the value of \fIcharclass\fP is invalid (that is,
+not obtained by a call to \fIwctype\fP() or \fIcharclass\fP is invalidated
+by a subsequent call to \fIsetlocale\fP() that has affected category
+\fILC_CTYPE )\fP the result is unspecified.
+.SH RETURN VALUE
+.LP
+The \fIiswctype\fP() function shall return non-zero (true) if and
+only if \fIwc\fP has the property described by
+\fIcharclass\fP. If \fIcharclass\fP is 0, \fIiswctype\fP() shall
+return 0.
+.SH ERRORS
+.LP
+No errors are defined.
+.LP
+\fIThe following sections are informative.\fP
+.SH EXAMPLES
+.SS Testing for a Valid Character
+.sp
+.RS
+.nf
+
+\fB#include <wctype.h>
+\&...
+int yes_or_no;
+wint_t wc;
+wctype_t valid_class;
+\&...
+if ((valid_class=wctype("vowel")) == (wctype_t)0)
+ /* Invalid character class. */
+yes_or_no=iswctype(wc,valid_class);
+\fP
+.fi
+.RE
+.SH APPLICATION USAGE
+.LP
+The twelve strings \fB"alnum"\fP, \fB"alpha"\fP, \fB"blank"\fP,
+\fB"cntrl"\fP, \fB"digit"\fP,
+\fB"graph"\fP, \fB"lower"\fP, \fB"print"\fP, \fB"punct"\fP, \fB"space"\fP,
+\fB"upper"\fP, and
+\fB"xdigit"\fP are reserved for the standard character classes. In
+the table below, the functions in the left column are
+equivalent to the functions in the right column.
+.sp
+.RS
+.nf
+
+\fBiswalnum(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("alnum"))
+iswalpha(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("alpha"))
+iswblank(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("blank"))
+iswcntrl(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("cntrl"))
+iswdigit(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("digit"))
+iswgraph(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("graph"))
+iswlower(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("lower"))
+iswprint(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("print"))
+iswpunct(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("punct"))
+iswspace(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("space"))
+iswupper(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("upper"))
+iswxdigit(\fP\fIwc\fP\fB) iswctype(\fP\fIwc\fP\fB, wctype("xdigit"))
+\fP
+.fi
+.RE
+.SH RATIONALE
+.LP
+None.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fIiswalnum\fP(), \fIiswalpha\fP(), \fIiswcntrl\fP(), \fIiswdigit\fP(),
+\fIiswgraph\fP(), \fIiswlower\fP(), \fIiswprint\fP(), \fIiswpunct\fP(),
+\fIiswspace\fP(), \fIiswupper\fP(), \fIiswxdigit\fP(), \fIsetlocale\fP(),
+\fIwctype\fP(), the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
+\fI<wchar.h>\fP, \fI<wctype.h>\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version 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 .