ISWGRAPH(3P)

πŸ¦‹ ISWGRAPH(3P) β€” the girlies' guide to iswgraph πŸ¦‹

okay bestie, this one's from the POSIX Programmer's Manual, and I'm about to make wide-character classification your whole personality. no cap. πŸ’…


✨ PROLOG ✨

so like, real talk first: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so go check the corresponding Linux manual page if you need the tea on Linux behavior specifically), or honestly? the interface might not even be implemented on Linux at all. πŸ’€


🌸 NAME 🌸

iswgraph, iswgraph_l β€” test for a visible wide-character code


πŸŽ€ SYNOPSIS πŸŽ€

#include <wctype.h>

int iswgraph(wint_t wc);
int iswgraph_l(wint_t wc, locale_t locale);

πŸ‘‘ DESCRIPTION πŸ‘‘

so for iswgraph() specifically: the functionality described on this reference page is aligned with the ISO C standard. and if there's any conflict between the requirements described here and the ISO C standard? that's unintentional, periodt. this volume of POSIX.1‐2017 defers to the ISO C standard. 🀝

the iswgraph() and iswgraph_l() functions shall test whether wc is a wide-character code representing a character of class graph in the current locale, or in the locale represented by locale, respectively. (if you wanna know what "class graph" even means, see the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale. iykyk.) πŸ“–

the wc argument is a wint_t, and the value of it? your application shall ensure it's a wide-character code corresponding to a valid character in the locale used by the function, or equal to the value of the macro WEOF. if the argument has any other value... bestie, the behavior is undefined. πŸ™ˆ

also undefined behavior alert 🚨 β€” if the locale argument to iswgraph_l() is the special locale object LC_GLOBAL_LOCALE, or if it's not a valid locale object handle, that's undefined behavior too. do not do this.

πŸ’– RETURN VALUE πŸ’–

the iswgraph() and iswgraph_l() functions shall return non-zero if wc is a wide-character code with a visible representation; otherwise, they shall return 0. that's it, that's the whole vibe check. βœ…


⭐ ERRORS ⭐

no errors are defined. not a single one. iconic, honestly. ✨

the following sections are informative.


🌈 EXAMPLES 🌈

None. β€” yeah bestie, nothing here. we move. 🧚


πŸ“ APPLICATION USAGE πŸ“

to ensure applications portability β€” especially across natural languages β€” only these functions and the functions in the reference pages listed in the SEE ALSO section should be used for character classification. like, stay in your lane, use the approved list. 🫢


πŸ’œ RATIONALE πŸ’œ

None. nothing to explain. it just is. πŸ’…


πŸ”₯ FUTURE DIRECTIONS πŸ”₯

None. no glow-up planned, this is the final form. πŸ‘‘


🌸 SEE ALSO 🌸

  • iswalnum()
  • iswalpha()
  • iswcntrl()
  • iswctype()
  • iswdigit()
  • iswlower()
  • iswprint()
  • iswpunct()
  • iswspace()
  • iswupper()
  • iswxdigit()
  • setlocale()
  • uselocale()

also, the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale, plus the headers <locale.h> and <wctype.h>. go read them, they're giving required reading. πŸ“š


portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's the whole page, bestie πŸ’– this was IEEE/The Open Group, 2017, for ISWGRAPH(3P) β€” thanks for coming to my ted talk, go classify some wide characters, ily, bye 🫢✨

πŸ“¦ where this page comes from