ISRUNE(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

okay bestie, welcome to the ISRUNE(3) manual page β€” yes, that's the manual name, and we're about to vibe-check characters πŸ’…. This one lives in the Standard C Library (libc, -lc), and it's giving "is this character even valid in the current character set?" energy.

✨ NAME ✨

isrune, isrune_l β€” valid character test, no cap πŸŽ€

πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc) β€” that's the library, bestie 🫢

🧚 SYNOPSIS 🧚

#include <ctype.h>

int
isrune(int c);

int
isrune_l(int c, locale_t loc);

πŸ’– DESCRIPTION πŸ’–

The isrune() and isrune_l() functions test for any character that is valid in the current character set. In the ASCII character set, this is equivalent to isascii() β€” iconic behavior, honestly ✨.

The isrune_l() function takes an explicit locale argument, whereas the isrune() function uses the current global or per-thread locale. So like, one is "use the locale you hand me," and the other is "use whatever the current global or per-thread locale is giving" 🌸.

πŸ¦‹ RETURN VALUES πŸ¦‹

The isrune() and isrune_l() functions return zero if the character tests false and return non-zero if the character tests true. Simple vibe check: zero means nope, non-zero means yep πŸ’œ.

⚠️ COMPATIBILITY ⚠️

bestie, listen: the 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases. The iswrune() or iswrune_l() function should be used instead. This is a "don't get too attached" situation 😭.

πŸ‘€ SEE ALSO πŸ‘€

🌈 HISTORY 🌈

The isrune() function appeared in 4.4BSD. a little icon, a little legend πŸ‘‘


Brought to you by the source/version Debian and dated December 19, 2022 β€” mwah πŸ’‹

πŸ“¦ where this page comes from