SDL_strupr(3)
πΈ SDL_strupr β bestie edition π
okay so this is SDL_strupr(3), one of the SDL3 FUNCTIONS β¨ it's the glow-up function: it takes a string and makes it ALL CAPS. uppercase era. periodt. π
β¨ NAME β¨
SDL_strupr</p> β convert a string to uppercase π
π SYNOPSIS π
#include <SDL3/SDL_stdinc.h>
char * SDL_strupr(char *str);
like, that's the whole vibe. one include, one function, no drama π«Ά
π¦ DESCRIPTION π¦
β οΈ WARNING: regardless of system locale, this will only convert ASCII values'A'through'Z'to uppercase.
okay so that warning? read it twice, bestie. regardless of system locale. it does not care about your locale. it does not care about your vibes. it only touches ASCII. π
This function operates on a null-terminated string of bytes β and yes, even if it is malformed UTF-8! π it literally does not check. it does not care. it just goes.
What it does: converts ASCII characters 'a' through 'z' to their uppercase equivalents in-place, and returns the original str pointer. in-place, meaning it edits the string you handed it. no copy, no new allocation, no extra credit. slay. π₯
π FUNCTION PARAMETERS π
strβ the string to convert in-place. Can not beNULL. π« like fr fr, do not passNULL. do not test it. do not be curious. π«Ά
π RETURN VALUE π
Returns the str pointer passed into this function. the same pointer. the identical one. it's giving "you get back exactly what you gave me" energy β¨ no surprises, no plot twist, iconic behavior honestly π
π THREAD SAFETY π
It is safe to call this function from any thread. β main character energy available on every thread, no gatekeeping π
β AVAILABILITY β
This function is available since SDL 3.2.0. if you're on anything older, sorry bestie, it's not there yet π
π SEE ALSO π
SDL_strlwr(3)β the lowercase sibling π§ the yin to this yang, the down to this up, the lowercase era to this uppercase era π
okay that's the whole page!! π that was SDL_strupr(3) from the Simple Directmedia Layer docs, SDL 3.4.18 edition β go forth, uppercase your strings, and remember: it's ASCII only, it's in-place, and str can not be NULL. no cap. bye bestie πβ¨π¦πΈ
π¦ 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