ISXDIGIT(3P)

πŸ’… ISXDIGIT(3P) β€” POSIX Programmer's Manual, bestie edition πŸ’…

okay so. hi. you're reading the POSIX Programmer's Manual page for isxdigit, and I am so glad you're here. quick heads up before we lock in: this page is the POSIX one, and the Linux implementation of this interface may differ β€” so like, go check the corresponding Linux manual page for the actual Linux behavior, bestie. or honestly the interface might not even be implemented on Linux at all. no cap. πŸ™ˆ


✨ PROLOG ✨

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β€” consult the corresponding Linux manual page for details of Linux behavior β€” or the interface may not be implemented on Linux. yeah. that's the whole disclaimer. moving on. 🫢


🌸 NAME 🌸

isxdigit, isxdigit_l β€” the girlies who test for a hexadecimal digit. that's it. that's the job. πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

#include <ctype.h>

int isxdigit(int c);
int isxdigit_l(int c, locale_t locale);

look at her. two functions. one header. iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so for isxdigit(): the functionality described on this reference page is aligned with the ISO C standard. if there's any conflict between what's written here and the ISO C standard, that conflict is unintentional β€” this volume of POSIX.1‐2017 defers to the ISO C standard. the ISO C girlies are the authority. periodt.

The isxdigit() and isxdigit_l() functions shall test whether c is a character of class xdigit in the current locale, or in the locale represented by locale, respectively. for the deets on locale, see the Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale.

The c argument is an int, and the value of it β€” the application shall ensure β€” is a character representable as an unsigned char or equal to the value of the macro EOF. 🚨 and if the argument has any other value? the behavior is undefined. like, undefined undefined. do not pass go. do not collect $200. 😭

⚠️ also the behavior is undefined if the locale argument to isxdigit_l() is the special locale object LC_GLOBAL_LOCALE, or if it's not a valid locale object handle. that's a hard no, bestie.

⭐ RETURN VALUE ⭐

The isxdigit() and isxdigit_l() functions shall return non-zero if c is a hexadecimal digit; otherwise, they shall return 0. simple as. binary queen. πŸ’–


πŸ“ ERRORS πŸ“

No errors are defined. she doesn't do errors. she's unbothered. πŸ’€

The following sections are informative. (aka: gossip, not gospel. the real requirements are up above.) ✨


🧚 EXAMPLES 🧚

None. absolutely zero examples. she said "figure it out." πŸ™ˆ


πŸ’œ APPLICATION USAGE πŸ’œ

okay so for the sake of application 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. no rogue homemade classification schemes, bestie. iykyk. 🌈


🌸 RATIONALE 🌸

None. no reasoning was given. the reasoning is vibes. πŸŽ€


πŸ¦‹ FUTURE DIRECTIONS πŸ¦‹

None. she is what she is. main character energy forever. πŸ‘‘


πŸ’« SEE ALSO πŸ’«

  • isalnum()
  • isalpha()
  • isblank()
  • iscntrl()
  • isdigit()
  • isgraph()
  • islower()
  • isprint()
  • ispunct()
  • isspace()
  • isupper()

The Base Definitions volume of POSIX.1‐2017, Chapter 7, Locale, <ctype.h> β€” go read those too, they're the squad. 🫢


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 page, bestie. brought to you by IEEE/The Open Group, 2017, ISXDIGIT(3P) β€” she's been serving since 2017 and she's still slaying. stay hex-y. mwah. πŸ’…βœ¨
πŸ“¦ where this page comes from