| 1 |
'\" t |
| 2 |
.\" Copyright, Bruno Haible <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
.\" |
| 7 |
.TH iswdigit 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
iswdigit \- test for decimal digit wide character |
| 10 |
.SH LIBRARY |
| 11 |
Standard C library |
| 12 |
.RI ( libc ,\~ \-lc ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.B #include <wctype.h> |
| 16 |
.P |
| 17 |
.BI "int iswdigit(wint_t " wc ); |
| 18 |
.fi |
| 19 |
.SH DESCRIPTION |
| 20 |
The |
| 21 |
.BR iswdigit () |
| 22 |
function is the wide-character equivalent of the |
| 23 |
.BR isdigit (3) |
| 24 |
function. |
| 25 |
It tests whether |
| 26 |
.I wc |
| 27 |
is a wide character |
| 28 |
belonging to the wide-character class "digit". |
| 29 |
.P |
| 30 |
The wide-character class "digit" is a subclass of the wide-character class |
| 31 |
"xdigit", and therefore also a subclass |
| 32 |
of the wide-character class "alnum", of |
| 33 |
the wide-character class "graph" and of the wide-character class "print". |
| 34 |
.P |
| 35 |
Being a subclass of the wide character |
| 36 |
class "print", the wide-character class |
| 37 |
"digit" is disjoint from the wide-character class "cntrl". |
| 38 |
.P |
| 39 |
Being a subclass of the wide-character class "graph", |
| 40 |
the wide-character class |
| 41 |
"digit" is disjoint from the wide-character class "space" and its subclass |
| 42 |
"blank". |
| 43 |
.P |
| 44 |
Being a subclass of the wide-character |
| 45 |
class "alnum", the wide-character class |
| 46 |
"digit" is disjoint from the wide-character class "punct". |
| 47 |
.P |
| 48 |
The wide-character class "digit" is |
| 49 |
disjoint from the wide-character class |
| 50 |
"alpha" and therefore also disjoint from its subclasses "lower", "upper". |
| 51 |
.P |
| 52 |
The wide-character class "digit" always |
| 53 |
contains exactly the digits \[aq]0\[aq] to \[aq]9\[aq]. |
| 54 |
.SH RETURN VALUE |
| 55 |
The |
| 56 |
.BR iswdigit () |
| 57 |
function returns nonzero |
| 58 |
if |
| 59 |
.I wc |
| 60 |
is a wide character |
| 61 |
belonging to the wide-character class "digit". |
| 62 |
Otherwise, it returns zero. |
| 63 |
.SH ATTRIBUTES |
| 64 |
For an explanation of the terms used in this section, see |
| 65 |
.BR attributes (7). |
| 66 |
.TS |
| 67 |
allbox; |
| 68 |
lbx lb lb |
| 69 |
l l l. |
| 70 |
Interface Attribute Value |
| 71 |
T{ |
| 72 |
.na |
| 73 |
.nh |
| 74 |
.BR iswdigit () |
| 75 |
T} Thread safety MT-Safe locale |
| 76 |
.TE |
| 77 |
.SH STANDARDS |
| 78 |
C11, POSIX.1-2008. |
| 79 |
.SH HISTORY |
| 80 |
POSIX.1-2001, C99. |
| 81 |
.SH NOTES |
| 82 |
The behavior of |
| 83 |
.BR iswdigit () |
| 84 |
depends on the |
| 85 |
.B LC_CTYPE |
| 86 |
category of the |
| 87 |
current locale. |
| 88 |
.SH SEE ALSO |
| 89 |
.BR isdigit (3), |
| 90 |
.BR iswctype (3) |