ISASCII(3P)

πŸ’– ISASCII(3P) β€” the POSIX Programmer's Manual era πŸ’–

okay bestie, so this one lives in the POSIX Programmer's Manual, and it's giving "tiny function, big standards energy" ✨

🚨 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 fr fr, go check the corresponding Linux manual page for the deets on Linux behavior), or honestly? the interface might not even be implemented on Linux at all. πŸ’€


✨ NAME ✨

isascii β€” test for a 7-bit US-ASCII character πŸ¦‹


🌸 SYNOPSIS 🌸

#include <ctype.h>

int isascii(int c);

πŸ’… DESCRIPTION πŸ’…

so the isascii() function shall test whether c is a 7-bit US-ASCII character code. that's it, that's the whole job. iconic, honestly. πŸ‘‘

and the tea is: isascii() is defined on all integer values. no gatekeeping, no restrictions. periodt. πŸ’œ


πŸŽ€ RETURN VALUE πŸŽ€

isascii() shall return non-zero if c is a 7-bit US-ASCII character code between 0 and octal 0177 inclusive πŸ“

otherwise? it shall return 0. simple as that, no cap. 🌈


😭 ERRORS 😭

no errors are defined. literally none. not a single one. we love a low-drama function. 🫢

the following sections are informative (iykyk β€” they're the vibe-check extras, not the rules).


⭐ EXAMPLES ⭐

None.

like... none. nothing. zero examples. bestie really said "figure it out" πŸ’€βœ¨


🧚 APPLICATION USAGE 🧚

here's the important bit: the isascii() function cannot be used portably in a localized application. so if you're in a localized app, this one's not your girl. πŸ™ˆ


πŸ’œ RATIONALE πŸ’œ

None.

no rationale. it just is. main character energy with no explanation. πŸ’…


πŸ‘‘ FUTURE DIRECTIONS πŸ‘‘

ok so plot twist 😭 β€” the isascii() function may be removed in a future version. she's on thin ice, bestie. enjoy her while she's here.


πŸ”₯ SEE ALSO πŸ”₯

  • The Base Definitions volume of POSIX.1‐2017, <ctype.h>

okay legal moment, gotta keep it real and keep every word:

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 .


πŸ’– that's the whole page, bestie. short, sweet, and standards-compliant.

IEEE/The Open Group β€” 2017 β€” mwah, love u, go test some ASCII πŸ’‹πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from