SDL_toupper(3)

πŸ’– SDL_toupper(3) πŸ’–

okay bestie, so like β€” ever had a lowercase letter that just needed a lil glow-up? that's literally this. it's SDL_toupper, from the SDL3 functions crew, and she converts low-ASCII English letters to uppercase. periodt. ✨


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_stdinc.h>

int SDL_toupper(int x);

πŸŽ€ DESCRIPTION πŸŽ€

⚠️ WARNING, babe, listen up: no matter what your system locale is doing, this function will only convert ASCII values 'a' through 'z' to uppercase. that's it. that's the whole range. she does not care about your fancy locale, she said "ASCII only, and I mean it." πŸ’…

so basically, this function returns the uppercase equivalent of x. and if a character cannot be converted, or if it's already uppercase (she's already iconic, nothing to do here), this function just returns x back to you untouched. no drama, no changes. πŸ¦‹


🫢 FUNCTION PARAMETERS 🫢

  • x β€” the character value to check. that's the vibe you're handing over. 🌈

⭐ RETURN VALUE ⭐

returns the capitalized version of x β€” or x if no conversion was available. either way you're getting a x back, it's just a question of whether she upgraded it or not. 😌


πŸ’€ THREAD SAFETY πŸ’€

it is safe to call this function from any thread. go wild. multi-threaded, single-threaded, whatever-threaded. she's chill like that. πŸ”₯


πŸ‘‘ AVAILABILITY πŸ‘‘

this function is available since SDL 3.2.0. so if you're on an older SDL, bestie... it's giving "not yet." 😭


and that's the whole page, no cap. simple directmedia layer, SDL 3.4.18, and the SDL_toupper(3) manual β€” mwah, love that for us. stan a one-job function that does her one job flawlessly. πŸ§šπŸ’œ

πŸ“¦ where this page comes from