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
xfalls 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
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms