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
wcis 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 ofiswcntrl()depends on theLC_CTYPEcategory 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