iswctype(3)

✨ iswctype β€” wide-character classification ✨

okay bestie, gather round, because today we're learning about iswctype(3), which lives in the Library Functions Manual and honestly? She's a vibe. πŸ’…


🌸 LIBRARY 🌸

Standard C library β€” that's libc, and you link it with -lc. iconic behavior, no notes. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <wctype.h>

int iswctype(wint_t wc, wctype_t desc);

πŸ’– DESCRIPTION πŸ’–

so here's the tea. You hand iswctype() a wide character in wc, plus a character property descriptor in desc, and it's basically doing a vibe check: does this character belong to the class that desc is describing? 🌈

If yes β€” if wc is a wide character that has the character property designated by desc (or, put another way, belongs to the character class designated by desc) β€” then iswctype() returns nonzero. Slay.

Otherwise? It returns zero. Not slay.

And one more thing, bestie, don't sleep on this: if wc is WEOF, zero is returned. Every single time. No exceptions. πŸ’€

also β€” and this is the part where you have to pay attention β€” desc must be a character property descriptor returned by the wctype(3) function. Like, it has to be one of those. Don't be out here making up your own descriptors, that's not the move. πŸ™ˆ


⭐ RETURN VALUE ⭐

  • iswctype() returns nonzero if wc has the designated property. πŸŽ‰
  • Otherwise, it returns 0.

that's it. that's the whole return value situation. periodt. πŸ‘‘


πŸ”₯ ATTRIBUTES πŸ”₯

ngl, if any of these terms are confusing you, the glossary lives over in attributes(7), go check her out. πŸ“š

  • iswctype() β€” Thread safety: MT-Safe

translation: she's thread-safe. multiple threads can pull up at the same time and nobody's gonna have a bad time. πŸ’―


πŸ¦‹ STANDARDS πŸ¦‹

  • C11
  • POSIX.1-2008

certified, standardized, main character energy. πŸ‘‘


🌈 HISTORY 🌈

She's been around a minute, fr fr:

  • POSIX.1-2001
  • C99

elder icon behavior honestly. πŸŽ€


πŸ’œ NOTES πŸ’œ

okay so this is the part people forget and then they're confused later: the behavior of iswctype() depends on the LC_CTYPE category of the current locale. 🌍

so like, the same character can get a totally different answer depending on where in the world your locale thinks it is. it's giving "context matters." don't forget it. πŸ’…


🧚 SEE ALSO 🧚

the whole girl gang, all of them:


lowkey reminder bestie: desc comes from wctype(3). pair them up like the iconic duo they are. 🫢

okay that's the whole page, mwah. πŸ’‹ this one came to you courtesy of Linux man-pages 6.20, dated 2026-02-08 β€” and yes, that's iswctype(3), we been knew. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ 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