iswspace(3)

✨ iswspace(3) ✨ β€” Library Functions Manual 🫢

okay bestie, pull up a chair, we're learning about iswspace πŸ’… this one is a whole icon in the wide-character world and honestly it's giving "quietly essential" energy.


🌸 NAME 🌸

iswspace β€” test for whitespace wide character

πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc) β€” yeah, the classic, no cap πŸŽ€

✨ SYNOPSIS ✨

#include <wctype.h>

int iswspace(wint_t wc);

πŸ’– DESCRIPTION πŸ’–

okay so first things first: iswspace() is literally the wide-character equivalent of the isspace(3) function. that's it, that's the vibe. it tests whether wc is a wide character belonging to the wide-character class "space". 🌈

now here's the lore. the wide-character class "space" is disjoint from the wide-character class "graph", which means it's also disjoint from all of graph's subclasses: "alnum", "alpha", "upper", "lower", "digit", "xdigit", and "punct". so no overlap bestie, they do not run in the same circles πŸ’…

meanwhile, the wide-character class "space" contains the wide-character class "blank". so blank is like... a sub-vibe. a little subset. cute. πŸŽ€

and here's the part that's fr fr important: the wide-character class "space" always contains at least the space character and these control characters: '\f', '\n', '\r', '\t', and '\v'. ⭐ like, bare minimum, this is the roster.

πŸŒ€ RETURN VALUE πŸŒ€

  • iswspace() returns nonzero if wc is a wide character that belongs to the wide-character class "space". slay. βœ…
  • otherwise it returns zero. not it. πŸ’€

πŸ‘‘ ATTRIBUTES πŸ‘‘

for an explanation of the terms used in this section, go peek at attributes(7) bestie.

  • Interface: iswspace()
  • Attribute: Thread safety
  • Value: MT-Safe locale

so like, it's thread safe, but locale-flavored thread safe. iykyk πŸ¦‹

πŸ“œ STANDARDS πŸ“œ

C11, POSIX.1-2008.

πŸ•°οΈ HISTORY πŸ•°οΈ

POSIX.1-2001, C99. so it's been around for a minute, an OG fr fr.

🧚 NOTES 🧚

the behavior of iswspace() depends on the LC_CTYPE category of the current locale. so like, change your locale, change the answer. πŸ™ˆ

real talk: this function is locale-sensitive, so don't act surprised when the result shifts depending on where you are. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page, you ate that 🫢 this little deep-dive brought to you by Linux man-pages 6.20, dated 2026-02-08, for iswspace(3). go forth and check your whitespace, 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