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