SDL_strlwr(3)

πŸ’– SDL_strlwr πŸ’–

okay bestie, welcome to SDL_strlwr from the SDL3 functions manual, page 3, we're in the group chat now πŸ’…


✨ NAME ✨

SDL_strlwr β€” convert a string to lowercase, in place, no thoughts just vibes πŸ¦‹


πŸ“œ SYNOPSIS πŸ“œ

#include <SDL3/SDL_stdinc.h>

char * SDL_strlwr(char *str);

🌸 DESCRIPTION 🌸

WARNING: no matter what your system locale is doing, this will only convert ASCII values 'A' through 'Z' to lowercase. That's it. That's the whole conversion. πŸ’€

This function operates on a null-terminated string of bytes β€” even if it is malformed UTF-8! β€” and converts ASCII characters 'A' through 'Z' to their lowercase equivalents in-place, returning the original str pointer. Periodt. πŸ’…

like, it does not care about your encoding drama, it does not allocate, it just reaches in and lowercases the ASCII letters right where they live. iconic behavior honestly ✨


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • str β€” the string to convert in-place. Can not be NULL. 🚫 (seriously, don't, that's not the move bestie)

🫢 RETURN VALUE 🫢

Returns the str pointer passed into this function. Same pointer you handed it, now lowercased. giving "you get back what you gave" energy πŸ’–


🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread. slay, no locks, no stress 🌈


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. iykyk πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, fr fr πŸ“ this was the SDL_strlwr(3) manual page from Simple Directmedia Layer, SDL 3.4.18 β€” mwah, love u, bye πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from