iswdigit(3)
β¨ iswdigit(3) β¨
okay bestie, welcome to the iswdigit page π this one lives in the Library Functions Manual, and it's genuinely one of the cutest little checks in <wctype.h>.
π NAME
iswdigit β test for decimal digit wide character
π LIBRARY
Standard C library (libc, -lc)
π«Ά SYNOPSIS
#include <wctype.h>
int iswdigit(wint_t wc);
π DESCRIPTION
So. iswdigit() is literally just the wide-character version of isdigit(3) β like, same energy, bigger characters. It tests whether wc is a wide character that belongs to the wide-character class "digit". That's it. That's the whole job. π
Now let's talk hierarchy, because the wide-character classes are giving family tree:
- The wide-character class "digit" is a subclass of the wide-character class "xdigit", and therefore also a subclass of "alnum", of "graph", and of "print".
- Because it's a subclass of "print", the wide-character class "digit" is disjoint from the wide-character class "cntrl".
- Because it's a subclass of "graph", "digit" is disjoint from "space" and its subclass "blank".
- Because it's a subclass of "alnum", "digit" is disjoint from "punct".
- And "digit" is disjoint from "alpha", which means it's also disjoint from "alpha"'s subclasses "lower" and "upper".
And the part you actually need to remember π₯: the wide-character class "digit" always contains exactly the digits '0' to '9'. No surprises, no extra friends, no impostors. periodt.
β RETURN VALUE
iswdigit() returns nonzero if wc is a wide character belonging to the wide-character class "digit". Otherwise it returns zero. Binary queen behaviour honestly π
π ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
- Interface:
iswdigit() - Attribute: Thread safety
- Value: MT-Safe locale
π STANDARDS
C11, POSIX.1-2008.
πΈ HISTORY
POSIX.1-2001, C99.
π NOTES
The behavior of iswdigit() depends on the LC_CTYPE category of the current locale. so like, set your locale bestie, that's the vibe check here π¦
π SEE ALSO
ngl this one is a short read and we ate. no cap π
and that's a wrap!! this was Linux man-pages 6.20, dated 2026-02-08 β mwah, go check a digit and stay iconic πβ¨π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms