SDL_isdigit(3)

SDL_isdigit(3) β€” from the SDL3 FUNCTIONS manual πŸ’–

okay bestie, gather round: this is the page for SDL_isdigit, and it's giving β€œis this character a digit?” energy. No cap, it's short, it's useful, and it has one very important warning. Let's go 🫢

🌸 NAME 🌸

SDL_isdigit - Report if a character is a numeric digit.

πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_stdinc.h>

int SDL_isdigit(int x);

πŸ’… DESCRIPTION πŸ’…

WARNING: Regardless of system locale, this will only treat ASCII values '0' (0x30) through '9' (0x39), as true. Periodt.

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • x β€” character value to check. (bestie, that's the whole parameter list, she's simple πŸ’…)

πŸ’« RETURN VALUE πŸ’«

Returns non-zero if x falls within the character class, zero otherwise. That's it, that's the tea.

🧡 THREAD SAFETY 🧡

It is safe to call this function from any thread. Slay, no locks needed, go off.

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. OG status: unlocked.


Signing off from Simple Directmedia Layer, version SDL 3.4.18, on the SDL_isdigit(3) page. No date listed in the footer, so that's the whole vibe β€” bye bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from