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 wc which are equal to towupper(wc) and different from towlower(wc) πŸ‘‘
  • and the class "upper" always contains at least the letters 'A' to 'Z' β€” like, always. non-negotiable. πŸ’–

πŸ”₯ RETURN VALUE πŸ”₯

  • if wc is 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 the LC_CTYPE category 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