SDL_ispunct(3)

πŸ’– SDL_ispunct πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_ispunct β€” the lil guy who tells you if a character is a punctuation mark. periodt.


✨ NAME ✨

SDL_ispunct β€” report if a character is a punctuation mark. like, is it a !? a ?? a lil ,? she'll tell you. πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_stdinc.h>

int SDL_ispunct(int x);

πŸ’… DESCRIPTION πŸ’…

WARNING: regardless of system locale, this is equivalent to c ((SDL_isgraph(x)) && (!SDL_isalnum(x)))

ngl bestie that's the whole vibe. no locale drama, no surprises β€” it's literally just "is it graphically renderable AND not a letter or a number?" and if yes, congrats, it's punctuation. πŸ”₯


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • x β€” the character value to check. hand her the character, she does the vibe check. πŸ‘‘

⭐ RETURN VALUE ⭐

Returns non-zero if x falls within the character class, zero otherwise. so: truthy = yes it's punctuation, falsy = no ma'am. πŸ’€


🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread. no cap. every thread can get a piece of this function, she's built different. 🫢


🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. iconic behavior honestly.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie!! this lil slice of the Simple Directmedia Layer manual, version SDL 3.4.18, was brought to you by SDL_ispunct(3) herself. go check your characters, stay punctual, and slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from