xref: /titanic_50/usr/src/man/man3c/iswalpha.3c (revision eab227978ccdaa5a7cc9fd92ace768915dae3a2b)
te
Copyright 2014 Garrett D'Amore <garrett@damore.org>
Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
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
http://www.opengroup.org/bookstore/.
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.
This notice shall appear on any product containing this material.
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.
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.
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]
ISWALPHA 3C "Jun 23, 2014"
NAME
iswalpha, isenglish, isideogram, iswideogram, isnumber, iswnumber, isphonogram, iswphonogram, isspecial, iswspecial, iswalnum, iswascii, iswblank, iswcntrl, iswdigit, iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit, iswhexnumber, iswalpha_l, iswideogram_l, iswnumber_l, iswphonogram_l, iswspecial_l, iswalnum_l, iswascii_l, iswblank_l, iswcntrl_l, iswdigit_l, iswgraph_l, iswlower_l, iswprint_l, iswpunct_l, iswspace_l, iswupper_l, iswhexnumber_l - wide-character code classification functions
SYNOPSIS

#include <wchar.h>
#include <wctype.h>

int iswalpha(wint_t wc);

int isenglish(wint_t wc);

int isideogram(wint_t wc);

int isnumber(wint_t wc);

int isphonogram(wint_t wc);

int isspecial(wint_t wc);

int iswalnum(wint_t wc);

int iswascii(wint_t wc);

int iswblank(wint_t wc);

int iswcntrl(wint_t wc);

int iswdigit(wint_t wc);

int iswgraph(wint_t wc);

int iswlower(wint_t wc);

int iswprint(wint_t wc);

int iswpunct(wint_t wc);

int iswspace(wint_t wc);

int iswupper(wint_t wc);

int iswxdigit(wint_t wc);

int iswhexnumber(wint_t wc);

int iswideogram(wint_t wc);

int iswnumber(wint_t wc);

int iswphonogram(wint_t wc);

int iswspecial(wint_t wc);

int iswalpha_l(wint_t wc, locale_t loc);

int iswideogram_l(wint_t wc, locale_t loc);

int iswnumber_l(wint_t wc, locale_t loc);

int iswphonogram_l(wint_t wc, locale_t loc);

int iswspecial_l(wint_t wc, locale_t loc);

int iswalnum_l(wint_t wc, locale_t loc);

int iswascii_l(wint_t wc, locale_t loc);

int iswblank_l(wint_t wc, locale_t loc);

int iswcntrl_l(wint_t wc, locale_t loc);

int iswdigit_l(wint_t wc, locale_t loc);

int iswgraph_l(wint_t wc, locale_t loc);

int iswlower_l(wint_t wc, locale_t loc);

int iswprint_l(wint_t wc, locale_t loc);

int iswpunct_l(wint_t wc, locale_t loc);

int iswspace_l(wint_t wc, locale_t loc);

int iswupper(wint_t wc, locale_t loc);

int iswxdigit(wint_t wc, locale_t loc);

#include <xlocale.h>

int iswhexnumber(wint_t wc, locale_t loc);
DESCRIPTION

These functions test whether wc is a wide-character code representing a character of a particular class defined in the LC_CTYPE category of the current locale or the locale specified by loc.

The functions iswalpha_l(), iswideogram_l(), iswnumber_l(), iswphonogram_l(), iswspecial_l(), iswalnum_l(), iswascii_l(), iswblank_l(), iswcntrl_l(), iswdigit_l(), iswgraph_l(), iswlower_l(), iswprint_l(), iswpunct_l(), iswspace_l(), iswupper_l(), all behave identically to their counterparts without the '_l' suffix, but instead of operating on the current locale, they operate on the locale specified by loc.

The functions, iswideogram(), iswnumber(), iswphonogram(), iswspecial(), and iswhexnumber(), are respectively identical to isideogram(), isnumber(), isphonogram(), isspecial(), iswxdigit() respectively. They are provided for compatability purposes.

In all cases, wc is a wint_t, the value of which must be a wide-character code corresponding to a valid character in the current locale or must equal the value of the macro WEOF. If the argument has any other values, the behavior is undefined. iswalpha(wc)

Tests whether wc is a wide-character code representing a character of class "alpha" in the program's current locale.

isenglish(wc)

Tests whether wc is a wide-character code representing an English language character, excluding ASCII characters.

isideogram(wc)

Tests whether wc is a wide-character code representing an ideographic language character, excluding ASCII characters.

isnumber(wc)

Tests whether wc is a wide-character code representing digit [0-9], excluding ASCII characters.

isphonogram(wc)

Tests whether wc is a wide-character code representing a phonetic language character, excluding ASCII characters.

isspecial(wc)

Tests whether wc is a wide-character code representing a special language character, excluding ASCII characters.

iswalnum(wc)

Tests whether wc is a wide-character code representing a character of class "alpha" or "digit" in the program's current locale.

iswascii(wc)

Tests whether wc is a wide-character code representing an ASCII character.

iswblank(wc)

Tests whether wc is a wide-character code representing a character of class "blank" in the program's current locale. This function is not available to applications conforming to standards prior to SUSv3. See standards(5).

iswlower(wc)

Tests whether wc is a wide-character code representing a character of class "lower" in the program's current locale.

iswcntrl(wc)

Tests whether wc is a wide-character code representing a character of class "cntrl" in the program's current locale.

iswdigit(wc)

Tests whether wc is a wide-character code representing a character of class "digit" in the program's current locale.

iswgraph(wc)

Tests whether wc is a wide-character code representing a character of class "graph" in the program's current locale.

iswprint(wc)

Tests whether wc is a wide-character code representing a character of class "print" in the program's current locale.

iswpunct(wc)

Tests whether wc is a wide-character code representing a character of class "punct" in the program's current locale.

iswspace(wc)

Tests whether wc is a wide-character code representing a character of class "space" in the program's current locale.

iswupper(wc)

Tests whether wc is a wide-character code representing a character of class "upper" in the program's current locale.

iswxdigit(wc)

Tests whether wc is a wide-character code representing a character of class "xdigit" in the program's current locale.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
CSI Enabled
Interface Stability See below.
MT-Level MT-Safe

The iswalpha(), iswalnum(), iswblank(), iswcntrl(), iswdigit(), iswgraph(), iswlower(), iswprint(), iswpunct(), iswspace(), iswupper(), and iswxdigit() functions are Standard.

The iswalpha_l(), iswalnum_l(), iswblank_l(), iswcntrl_l(), iswdigit_l(), iswgraph_l(), iswlower_l(), iswprint_l(), iswpunct_l(), iswspace_l(), and iswupper_l() functions are Standard.

SEE ALSO

localedef(1), newlocale(3C), setlocale(3C), stdio(3C), uselocale(3C), ascii(5), attributes(5), standards(5)