SDL_isalpha(3)

πŸ’– NAME πŸ’–

SDL_isalpha β€” bestie, this is the one that checks if a character is alphabetic, aka an actual letter. πŸ”€βœ¨


✨ SYNOPSIS ✨

#include <SDL3/SDL_stdinc.h>

int SDL_isalpha(int x);

🌸 DESCRIPTION 🌸

Okay so here's the tea, and it's important tea, so listen up. πŸ«–

⚠️ WARNING: no matter what your system locale is doing β€” literally regardless of it β€” this function will only treat ASCII values for English 'a-z' and 'A-Z' as true. That's it. That's the whole vibe. Don't come for it with your fancy locale expectations, it's not gonna happen. πŸ’…

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • x β€” the character value you wanna check. that's it, that's the whole input. πŸ‘‘

πŸ’« RETURN VALUE πŸ’«

Returns non-zero if x falls within the character class, and zero otherwise. So like... truthy = yes it's a letter, falsy = nope bestie, not a letter. πŸ¦‹

πŸ”₯ THREAD SAFETY πŸ”₯

It is safe to call this function from any thread. Go off, call it from literally wherever, it does not care. Main character energy, zero drama. πŸ‘‘

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. So if you're on something older... girl. upgrade. 😭


and that's the whole page, no cap πŸ’œ this lil writeup came straight outta the Simple Directmedia Layer crew, sitting pretty at SDL 3.4.18, dated SDL_isalpha(3) β€” mwah, iconic, periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from