SDL_PRILL_PREFIX(3)
π SDL_PRILL_PREFIX(3) β SDL3 FUNCTIONS β¨
okay bestie, welcome to the SDL3 corner of the man pages, this one's a lil baby macro and honestly? it's iconic for what it does. π
πΈ NAME πΈ
SDL_PRILL_PREFIX β a printf-formatting string prefix for a long long value. that's it. that's the whole job. she's a prefix and she's slaying. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_stdinc.h>
#define SDL_PRILL_PREFIX "ll"
like. she's just the two letters ll. no cap.
β¨ DESCRIPTION β¨
okay so listen. SDL_PRILL_PREFIX is just the prefix. that's the whole thing. it is not the main character of your format string, it's the supporting role. π«Ά
if you're actually trying to print a long long, you highkey probably want one of her sisters instead:
SDL_PRILLdSDL_PRILLuSDL_PRILLxSDL_PRILLX
but if you're out here hand-assembling your own format string and you need the prefix bit to do it, she's right there for you. π
use it like this:
SDL_Log("There are %" SDL_PRILL_PREFIX "d bottles of beer on the wall.", bottles);
see how the "ll" just slots in between the % and the d? it's giving β¨string concatenationβ¨, it's giving C preprocessor girlbossery, it's giving portable long long formatting. the way that she just works across platforms so you don't have to guess whether your compiler wants ll or something else. obsessed. π
π AVAILABILITY π
this macro is available since SDL 3.2.0. so if you're on something older, bestie, she is not there and you will get a compile error, and that's on you fr fr. π
ngl, if you only take one thing from this page: this is a prefix, not a full format specifier. do not pass her to printf alone and expect magic. she needs a conversion character to complete her. it's a two-piece situation. π
Simple Directmedia Layer β SDL 3.4.18 π
and that's the whole page, bestie!! go forth and format your long longs responsibly, mwah, ily, bye ππ¦π
π¦ 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