iswupper(3)
π iswupper β bestie, is this wide char uppercase or nah?
okay so picture this: you're deep in <wctype.h> land, you got a wide character, and you just need to know β is it giving UPPERCASE energy or not? that's literally the whole job of iswupper. she's the wide-character glow-up of isupper(3), and she eats every time. β¨
library situation: Standard C library (libc, -lc). yes bestie, the one you already have. π«Ά
β¨ SYNOPSIS β¨
#include <wctype.h>
int iswupper(wint_t wc);
likeβ¦ two lines. she's lowkey iconic for that. π
π¦ DESCRIPTION π¦
so iswupper() is the wide-character equivalent of the isupper(3) function β same vibe, wider characters. her whole thing is testing whether wc is a wide character that belongs to the wide-character class "upper".
and now for the class lore, because the family tree here is deep:
- the class "upper" is a subclass of "alpha" π§
- and since she's in "alpha", she's also a subclass of "alnum", of "graph", and of "print"
and because family drama means exclusions, let's do the β¨vibe checkβ¨ on who she does not hang out with:
- being a subclass of "print" means "upper" is disjoint from "cntrl" β no control characters in this clique, periodt π
- being a subclass of "graph" means "upper" is disjoint from "space" and its subclass "blank" β she does not do whitespace, nope
- being a subclass of "alnum" means "upper" is disjoint from "punct" β no punctuation allowed, sorry not sorry
- being a subclass of "alpha" means "upper" is disjoint from "digit" β numbers, you are NOT on the list π
now the actual membership rules, fr fr:
- the class "upper" contains at least those characters
wcwhich are equal totowupper(wc)and different fromtowlower(wc)π - and the class "upper" always contains at least the letters
'A'to'Z'β like, always. non-negotiable. π
π₯ RETURN VALUE π₯
- if
wcis a wide character belonging to the wide-character class "upper" β returns nonzero β - otherwise β returns zero β
that's it. binary queen. π
π ATTRIBUTES π
for an explanation of the terms used in this section, see attributes(7). here's the tea:
iswupper()- Attribute: Thread safety
- Value: MT-Safe locale
β STANDARDS β
- C11, POSIX.1-2008
πΈ HISTORY πΈ
- POSIX.1-2001, C99
so she's been around a minute. vintage but make it slay. π
π NOTES π
- the behavior of
iswupper()depends on theLC_CTYPEcategory of the current locale. so like, change your locale, change your answers. iykyk π - also, real talk: this function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case. three. case. bestie. this function only knows two. π
π SEE ALSO π
and that's the whole page, pookie π«Ά this was iswupper from the Linux man-pages 6.20, dated 2026-02-08. go forth and test your wide chars with main character energy. bye bestie!! πβ¨π¦
π¦ 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