ISWALNUM(3P)

✨ ISWALNUM(3P) β€” the POSIX Programmer's Manual, but make it a group chat ✨

okay bestie, come get your wide-character alphanumeric check πŸ’… this is page ISWALNUM(3P) from the POSIX Programmer's Manual and it's honestly shorter than your attention span, so let's go.


🌸 PROLOG 🌸

Real talk before we even start: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so go consult the corresponding Linux manual page for the deets on Linux behavior), or β€” plot twist β€” the interface may not be implemented on Linux at all. πŸ™ˆ


πŸ’– NAME πŸ’–

iswalnum, iswalnum_l β€” test for an alphanumeric wide-character code. that's it, that's the function. it's giving "am I a letter or a number, be honest" ⭐


πŸŽ€ SYNOPSIS πŸŽ€

#include <wctype.h>

int iswalnum(wint_t wc);
int iswalnum_l(wint_t wc, locale_t locale);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so for iswalnum() specifically: 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 drama, no beef, this volume of POSIX.1‐2017 defers to the ISO C standard. 🫢

The iswalnum() and iswalnum_l() functions shall test whether wc is a wide-character code representing a character of class alpha or digit in the current locale, or in the locale represented by locale, respectively. (see the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale β€” yes, they're sending you to Chapter 7, it's that girl πŸ‘‘)

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. not "kinda weird", not "slightly off" β€” undefined. we don't do that here. πŸ’€
⚠️ Also the behavior is undefined if the locale argument to iswalnum_l() is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle. don't do it, bestie, it's not the vibe. 😭

πŸ”₯ RETURN VALUE πŸ”₯

The iswalnum() and iswalnum_l() functions shall return non-zero if wc is an alphanumeric wide-character code; otherwise, they shall return 0.

like. it's a yes or a no. main character energy either way. πŸ’…


🌈 ERRORS 🌈

No errors are defined.

The following sections are informative. (so everything after this is tea, not law β˜•)


⭐ EXAMPLES ⭐

None. not one. zero examples. iconic of them honestly. πŸŽ€


πŸ’œ 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. don't get cute and roll your own, iykyk.


🧚 RATIONALE 🧚

None.


🌸 FUTURE DIRECTIONS 🌸

None. the future is bright and it contains no changes to this function ✨


🫢 SEE ALSO 🫢

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

Also the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale, plus these headers:

  • <locale.h>
  • <stdio.h>
  • <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 .


okay that's the whole page, no notes, you ate that πŸ“βœ¨

IEEE/The Open Group Β· 2017 Β· ISWALNUM(3P) β€” mwah, love u, go classify some wide characters responsibly πŸ’…πŸ‘‘

πŸ“¦ where this page comes from