 |
Index for Section 3 |
|
 |
Alphabetical listing for I |
|
 |
Bottom of page |
|
iswalnum(3)
NAME
iswalnum, iswalpha, iswcntrl, iswdigit, iswgraphiswlower, iswprint,
iswpunct, iswspace, iswupper, iswxdigit - Classify a wide character
SYNOPSIS
#include <wctype.h>
int iswalnum
wint_t wc );
int iswalpha(
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 );
LIBRARY
Standard C Library (libc)
STANDARDS
Interfaces documented on this reference page conform to industry standards
as follows:
iswalnum(), iswalpha(), iswcntrl(), iswdigit(), iswgraph(), iswlower(),
iswprint(), iswpunct(), iswspace(), iswupper(), iswxdigit(): XSH5.0
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
PARAMETERS
wc Specifies a wide character for testing.
DESCRIPTION
These functions test a wide character wc for membership in a character
class in the current locale. Each function tests to see if a wide character
is part of a different character class.
If the wide character is part of the character class, these functions
return a nonzero value for true; otherwise, they return a value of 0 (zero)
for false.
Each function is named by adding the prefix isw to the name of the
character class that the function tests. For example, the iswalpha()
function tests whether the wide character specified by the wc parameter
belongs to the alpha class.
The following list identifies each function and describes the conditions
under which it returns a true value:
iswalnum()
When wc is a character of class alpha or class digit in the program's
current locale.
iswalpha()
When wc is a character of class alpha in the program's current locale.
Characters in classes lower and upper automatically belong to class
alpha.
iswcntrl()
When wc is a character of class cntrl in the program's current locale.
iswdigit()
When wc is a character of class digit in the program's current locale.
The following characters are included in this class:
0 1 2 3 4 5 6 7 8 9
iswgraph()
When wc is a character of class graph in the program's current locale.
Characters in classes alpha, digit, and punct are automatically in
class graph. Unlike iswprint(), iswgraph() returns FALSE for the space
character.
iswlower()
When wc is a character of class lower in the program's current locale.
At a minimum, the 26 lowercase US-ASCII characters are included in this
class. These are:
a b c d e f g h i j k l m n o p q r s t u v w x y z
iswprint()
When wc is a character of class print in the program's current locale.
All characters in the class graph and the space character are
automatically included in class print.
iswpunct()
When wc is a character of class punct in the program's current locale.
iswspace()
When wc is a character of class space in the program's current locale.
At a minimum, the space, form-feed, newline, carriage-return, tab, and
vertical-tab characters are included in this class.
iswupper()
When wc is a character of class upper in the program's current locale.
At a minimum, the 26 uppercase US-ASCII characters are included in this
class. These are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
iswxdigit()
When wc is a character of class xdigit in the program's current locale.
The following characters are included in this class:
0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
These functions determine the class of a wide character based on the
LC_CTYPE locale category.
NOTES
[Tru64 UNIX] The iswdigit(), iswxdigit(), and iswalnum() functions do not
recognize Thai digits. Many applications make assumptions about how a
digit character can be converted to its numeric equivalent. Changing the
functions to recognize Thai digits would break these applications. Refer to
TACTIS(5) for more information about Thai digits.
RETURN VALUES
If the wide character tested is part of the particular character class,
these functions return a nonzero value; otherwise, they return a value of 0
(zero).
If the input value (wc) is not in the range of wide characters defined by
the current locale, the result is undefined. To check the range of input
values, compile applications with standard compile options such as -
DOPEN_SOURCE. If the application compiles with any of the standard compile
options, the interfaces documented in this reference page resolve as
functions, which perform internal range checking. A default compilation
(that is, no standard compile options specified) results in resolution of
the interfaces as macros, which do not perform internal range checking.
SEE ALSO
Files: locale(4)
Functions: ctype(3), iswctype(3), setlocale(3), tolower(3), towctrans(3),
towlower(3), wctrans(3), wctype(3)
Others: i18n_intro(5), l10n_intro(5), standards(5)
 |
Index for Section 3 |
|
 |
Alphabetical listing for I |
|
 |
Top of page |
|