SDL_isalnum(3)

πŸ’– SDL_isalnum β€” bestie, is this a letter or a number? πŸ’–

okay so welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_isalnum. ✨ She's giving "simple", she's giving "tiny", and honestly? She ate. Let's get into it.


🌸 NAME 🌸

SDL_isalnum β€” bestie, this is the girl who tells you whether a character is alphabetic (a letter) or a number. That's it. That's the whole job. πŸ’…


✨ SYNOPSIS ✨

like, here's the vibe, literally copy-paste it:

#include <SDL3/SDL_stdinc.h>

int SDL_isalnum(int x);

πŸ¦‹ DESCRIPTION πŸ¦‹

She checks if a character is a letter or a number. Cute, right? adorable, even.

⚠️ WARNING, no cap: regardless of the system locale, this function will only treat ASCII values for English 'a-z', 'A-Z', and '0-9' as true. So don't come at her with your fancy locale-dependent accented characters β€” she is NOT doing that. She said ASCII only and she meant it. 😭

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • x β€” the character value to check. Just hand her the character, she'll do the rest. 🫢

🌈 RETURN VALUE 🌈

  • non-zero if x falls within the character class β€” i.e. it's a letter or a number, slay πŸ’–
  • zero otherwise β€” not a letter, not a number, we move on πŸ™ˆ

🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread. Periodt. No locks, no drama, no "wait for the main thread" nonsense. She's chill like that. ✨


πŸ‘‘ AVAILABILITY πŸ‘‘

This function is available since SDL 3.2.0. If your SDL is older than that... girl, upgrade. πŸ’€


πŸ’œ SEE ALSO πŸ’œ

(no extra references in this one β€” she stands alone, iconic behavior honestly)


and that's the whole page, bestie! every option, every warning, every detail, all present and accounted for. πŸ’–

this has been a page from Simple Directmedia Layer, SDL 3.4.18, and it's filed under SDL_isalnum(3) in the SDL3 functions corner of the manual β€” mwah, take care of her, she's fragile (she's not, she's thread-safe). πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from