ISWGRAPH(3POSIX)

πŸ’– ISWGRAPH(3POSIX) β€” POSIX Programmer's Manual πŸ’–

okay bestie, welcome to the ISWGRAPH(3POSIX) page, straight out of the POSIX Programmer's Manual πŸŽ€ this one's a lil cutie, let's get into it ✨


🌸 PROLOG 🌸

so like, heads up before we even start: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the details on Linux behavior, k?), or the interface may not be implemented on Linux at all. no cap, that's just how it is πŸ™ˆ


✨ NAME ✨

iswgraph, iswgraph_l β€” test for a visible wide-character code. that's the whole job, that's the assignment πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <wctype.h>

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

like, look at her. two lil functions, one header, zero drama 🌈


πŸ’œ DESCRIPTION πŸ’œ

so for iswgraph(): the functionality described on this reference page is aligned with the ISO C standard. any conflict between the requirements described here and the ISO C standard is unintentional β€” genuinely not on purpose, we promise. this volume of POSIX.1‐2017 defers to the ISO C standard. periodt.

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, go look at the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale. it's all in there πŸ‘‘

the wc argument is a wint_t, the value of which the application shall ensure is 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, the behavior is undefined. like, undefined undefined. don't do it bestie 😭

the behavior is also undefined if the locale argument to iswgraph_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle. so pls, valid handles only, we're not doing chaos today πŸ™ˆ

🫢 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 tea πŸ“


πŸ’€ ERRORS πŸ’€

no errors are defined. iconic behavior honestly, zero problems.

the following sections are informative. (iykyk β€” informative means it's the vibes, not the rules ✨)


🌟 EXAMPLES 🌟

none. literally none. we're keeping it minimal πŸ’…


πŸŽ€ APPLICATION USAGE πŸŽ€

to ensure applications portability β€” especially across natural languages, which is a whole thing β€” only these functions and the functions in the reference pages listed in the SEE ALSO section should be used for character classification. don't go rogue with your own classifier, bestie, it won't travel well 🌍


🧚 RATIONALE 🧚

none. nothing to justify, she just is πŸ’œ


⭐ FUTURE DIRECTIONS ⭐

none. the future is looking exactly like the present, and honestly? slay.


πŸ‘‘ 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> πŸ¦‹


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 one came to you from IEEE/The Open Group, 2017 β€” ISWGRAPH(3POSIX), that's a wrap, mwah πŸ’…βœ¨