1iswctype(3C) Standard C Library Functions iswctype(3C)
2
3
4
6 iswctype - test character for specified class
7
9 #include <wchar.h>
10
11 int iswctype(wint_t wc, wctype_t charclass);
12
13
15 The iswctype() function determines whether the wide-character code wc
16 has the character class charclass, returning TRUE or FALSE. The iswc‐
17 type() function is defined on WEOF and wide-character codes correspond‐
18 ing to the valid character encodings in the current locale. If the wc
19 argument is not in the domain of the function, the result is undefined.
20 If the value of charclass is invalid (that is, not obtained by a call
21 to wctype(3C) or charclass is invalidated by a subsequent call to set‐
22 locale(3C) that has affected category LC_CTYPE), the result is indeter‐
23 minate.
24
26 The iswctype() function returns 0 for FALSE and non-zero for TRUE.
27
29 There are twelve strings that are reserved for the standard character
30 classes:
31
32
33
34 │ │
35 "alnum" │"alpha" │ "blank"
36 ────────────────────┼────────────────────┼────────────────────
37 "cntrl" │"digit" │ "graph"
38 ────────────────────┼────────────────────┼────────────────────
39 "lower" │"print" │ "punct"
40 ────────────────────┼────────────────────┼────────────────────
41 "space" │"upper" │ "xdigit"
42
43
44
45 In the table below, the functions in the left column are equivalent to
46 the functions in the right column.
47
48
49
50
51 iswalnum(wc) iswctype(wc, wctype("alnum"))
52 iswalpha(wc) iswctype(wc, wctype("alpha"))
53 iswcntrl(wc) iswctype(wc, wctype("cntrl"))
54 iswdigit( wc) iswctype(wc, wctype("digit"))
55 iswgraph(wc) iswctype(wc, wctype("graph"))
56 iswlower(wc) iswctype(wc, wctype("lower"))
57 iswprint(wc) iswctype(wc, wctype("print"))
58 iswpunct(wc) iswctype( wc, wctype("punct"))
59 iswspace(wc) iswctype(wc, wctype("space"))
60 iswupper(wc) iswctype(wc, wctype("upper"))
61 iswxdigit(wc) iswctype(wc, wctype("xdigit"))
62
63
64
65 The call
66
67
68 iswctype(wc, wctype("blank"))
69
70
71 does not have an equivalent isw*() function.
72
74 See attributes(5) for descriptions of the following attributes:
75
76
77
78
79 ┌─────────────────────────────┬─────────────────────────────┐
80 │ATTRIBUTE TYPE │ATTRIBUTE VALUE │
81 ├─────────────────────────────┼─────────────────────────────┤
82 │CSI │Enabled │
83 ├─────────────────────────────┼─────────────────────────────┤
84 │Interface Stability │Standard │
85 ├─────────────────────────────┼─────────────────────────────┤
86 │MT-Level │MT-Safe with exceptions │
87 └─────────────────────────────┴─────────────────────────────┘
88
90 iswalpha(3C), setlocale(3C), wctype(3C), attributes(5), environ(5),
91 standards(5)
92
93
94
95SunOS 5.11 24 Jul 2002 iswctype(3C)