iswcntrl(3)

✨ iswcntrl β€” test for control wide character ✨

okay bestie, gather round, we're doing iswcntrl(3) from the Library Functions Manual and honestly it's a little cutie. πŸ’– It lives in the Standard C library (libc, -lc) so like, she's already there for you, no extra linking drama. 🫢


🌸 SYNOPSIS 🌸

#include <wctype.h>

int iswcntrl(wint_t wc);

πŸŽ€ DESCRIPTION πŸŽ€

So iswcntrl() is literally just the wide-character glow-up of iscntrl(3), no cap. πŸ’… She looks at wc and tells you if it's a wide character that belongs to the wide-character class "cntrl".

And here's the tea: the "cntrl" class is disjoint from the "print" class β€” meaning there's zero overlap, they don't know each other, they don't text back 😭 β€” and because of that it's also disjoint from all of "print"'s lil subclasses: "graph", "alpha", "upper", "lower", "digit", "xdigit", and "punct". Periodt.

Also for an unsigned char c: iscntrl(c) implies iswcntrl(btowc(c)), but not the other way around. One-way street, iykyk. 🚦


πŸ’– RETURN VALUE πŸ’–

  • She hands you nonzero if wc is a wide character in the wide-character class "cntrl". slay. ✨
  • Otherwise? zero. humble. πŸ™ˆ

πŸ‘‘ ATTRIBUTES πŸ‘‘

for the whole explanation of what these terms even mean, go check attributes(7) β€” that's the homework bestie πŸ“š

  • iswcntrl() β€” Thread safety: MT-Safe locale 🧚

🌈 STANDARDS 🌈

C11, POSIX.1-2008. certified iconic. ⭐


πŸ¦‹ HISTORY πŸ¦‹

She's been around: POSIX.1-2001, C99. an elder, a legend, a main character. πŸ‘‘


πŸ’€ NOTES πŸ’€

the behavior of iswcntrl() depends on the LC_CTYPE category of the current locale 🌍

so like, don't be shocked when she acts different in a different locale, that's just her vibe check.


πŸ’œ SEE ALSO πŸ’œ


and that's a wrap on iswcntrl(3) from Linux man-pages 6.20, dated 2026-02-08 πŸŽ€ go forth and test your control wide characters, bestie, you ate fr fr πŸ’…βœ¨πŸ«Ά

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