1wctype(3) Library Functions Manual wctype(3)
2
3
4
6 wctype - wide-character classification
7
9 Standard C library (libc, -lc)
10
12 #include <wctype.h>
13
14 wctype_t wctype(const char *name);
15
17 The wctype_t type represents a property which a wide character may or
18 may not have. In other words, it represents a class of wide charac‐
19 ters. This type's nature is implementation-dependent, but the special
20 value (wctype_t) 0 denotes an invalid property. Nonzero wctype_t val‐
21 ues can be passed to the iswctype(3) function to actually test whether
22 a given wide character has the property.
23
24 The wctype() function returns a property, given by its name. The set
25 of valid names depends on the LC_CTYPE category of the current locale,
26 but the following names are valid in all locales.
27
28 "alnum" - realizes the isalnum(3) classification function
29 "alpha" - realizes the isalpha(3) classification function
30 "blank" - realizes the isblank(3) classification function
31 "cntrl" - realizes the iscntrl(3) classification function
32 "digit" - realizes the isdigit(3) classification function
33 "graph" - realizes the isgraph(3) classification function
34 "lower" - realizes the islower(3) classification function
35 "print" - realizes the isprint(3) classification function
36 "punct" - realizes the ispunct(3) classification function
37 "space" - realizes the isspace(3) classification function
38 "upper" - realizes the isupper(3) classification function
39 "xdigit" - realizes the isxdigit(3) classification function
40
42 The wctype() function returns a property descriptor if the name is
43 valid. Otherwise, it returns (wctype_t) 0.
44
46 For an explanation of the terms used in this section, see at‐
47 tributes(7).
48
49 ┌─────────────────────────────────────┬───────────────┬────────────────┐
50 │Interface │ Attribute │ Value │
51 ├─────────────────────────────────────┼───────────────┼────────────────┤
52 │wctype() │ Thread safety │ MT-Safe locale │
53 └─────────────────────────────────────┴───────────────┴────────────────┘
54
56 C11, POSIX.1-2008.
57
59 POSIX.1-2001, C99.
60
62 The behavior of wctype() depends on the LC_CTYPE category of the
63 current locale.
64
66 iswctype(3)
67
68
69
70Linux man-pages 6.05 2023-07-20 wctype(3)