ISWPRINT(3P)

πŸ’– ISWPRINT(3P) β€” bestie edition πŸ’–

okay so this page lives in the POSIX Programmer's Manual, and we're talking about iswprint and iswprint_l today. periodt.


✨ PROLOG ✨

so like, heads up: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so bestie, pls go consult the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may just not be implemented on Linux at all. πŸ™ˆ


🌸 NAME 🌸

iswprint, iswprint_l β€” test for a printable wide-character code πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <wctype.h>

int iswprint(wint_t wc);
int iswprint_l(wint_t wc, locale_t locale);

πŸ¦‹ DESCRIPTION πŸ¦‹

so for iswprint(): 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 β€” no cap, it's an accident. this volume of POSIX.1‐2017 defers to the ISO C standard.

the iswprint() and iswprint_l() functions shall test whether wc is a wide-character code representing a character of class print in the current locale, or in the locale represented by locale, respectively. (go see the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale for the full lore πŸ“–)

the wc argument is a wint_t, and the value of it β€” 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, we don't know her. πŸ’€

also, the behavior is undefined if the locale argument to iswprint_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle. don't do that. fr fr.


πŸ’œ RETURN VALUE πŸ’œ

iswprint() and iswprint_l() shall return non-zero if wc is a printable wide-character code; otherwise, they shall return 0. simple as. ✨


πŸ“ ERRORS πŸ“

No errors are defined. iconic, honestly. nothing to worry about.

the following sections are informative (aka the bonus content, the DVD extras πŸ‘‘).


🌈 EXAMPLES 🌈

None. (i know, i know, we were all hoping. 😭)


πŸ’… 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. that's the vibe check. don't go rogue.


🧚 RATIONALE 🧚

None. (yes bestie, that's it, that's the section.)


⭐ FUTURE DIRECTIONS ⭐

None. she's staying exactly how she is. main character energy, no notes.


πŸ”₯ SEE ALSO πŸ”₯

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

also the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale, plus <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 β€” it's the one holding the whistle, not this page.

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 from IEEE/The Open Group, dated 2017, and it's filed under ISWPRINT(3P). go forth and classify your wide characters, you absolute icon πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from