ISIDEOGRAM(3)

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

πŸ¦‹ ISIDEOGRAM(3) πŸ¦‹

okay so bestie, welcome to the isideogram page πŸ’– this is one of those cute little <ctype.h> besties that just... tells you if a character is ideographic. that's it. that's the whole vibe. it lives in the Standard C Library (libc, link with -lc) and honestly? it's giving "small but mighty." ✨


πŸŽ€ NAME πŸŽ€

isideogram, isideogram_l β€” the ideographic character test, no cap πŸ’…


πŸ“š LIBRARY πŸ“š

Standard C Library β€” libc, -lc 🫢


✨ SYNOPSIS ✨

#include <ctype.h>

int
isideogram(int c);

int
isideogram_l(int c, locale_t loc);

πŸ’– DESCRIPTION πŸ’–

so <pink>isideogram()</pink> and <pink>isideogram_l()</pink> are literally just here to test for an ideographic character. that's the job. main character energy, zero drama. 🌸

the difference between them? <purple>isideogram_l()</purple> takes an explicit locale argument (loc), while <purple>isideogram()</purple> uses the current global or per-thread locale β€” iykyk, whichever one is in play. πŸ”₯


⭐ RETURN VALUES ⭐

both functions are super simple:

  • return zero if the character tests false πŸ™ˆ
  • return non-zero if the character tests true βœ…

that's the whole story, bestie. no surprises. πŸŽ€


πŸ’€ COMPATIBILITY πŸ’€

okay this is the part where we get serious for a sec 🫢

there's this 4.4BSD extension where you could pass arguments outside of the range of the unsigned char type in locales with large character sets. that behavior is considered obsolete and may not be supported in future releases. so like... don't rely on it, fr fr. 😭

instead, you should be using iswideogram() or iswideogram_l(). please. for me. πŸ’…

🌈 SEE ALSO 🌈

go read those too, they're iconic πŸ‘‘


πŸ¦‹ HISTORY πŸ¦‹

isideogram() first appeared in 4.4BSD. a true vintage moment πŸŽ€βœ¨


and that's the whole page, bestie!! this one came from Debian, dated December 19, 2022 β€” mwah, sending you love and correctly-tested characters πŸ«ΆπŸ’œπŸ§š

πŸ“¦ where this page comes from