iswalnum(3) Library Functions Manual iswalnum(3)
NAME
iswalnum, iswalpha, iswcntrl, iswdigit, iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit - Classify a wide character
LIBRARY
Standard C Library (libc)
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);
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
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: When wc is a character of
class alpha or class digit in the program's current locale. When wc is a character of class alpha in the program's current locale. Charac-
ters in classes lower and upper automatically belong to class alpha. When wc is a character of class cntrl in the program's current
locale. 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 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. When wc is a charac-
ter 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 When wc is a character of class print in the program's current locale. All char-
acters in the class graph and the space character are automatically included in class print. When wc is a character of class punct
in the program's current locale. 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. 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 When wc is a character of class xdigit in the program's current locale. The fol-
lowing 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 appli-
cations. 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).
RELATED INFORMATION
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) delim off
iswalnum(3)