SDL_PRIx64(3)
π SDL_PRIx64(3) β a lil' page from the SDL3 FUNCTIONS fam π
okay bestie, sit down, hydrate, and let me tell you about the most lowkey iconic little macro in all of SDL. this is SDL_PRIx64, and she is serving exactly one job, and she does it flawlessly. no cap.
β¨ NAME β¨
SDL_PRIx64 β a printf-formatting string for a Uint64 value as lower-case hexadecimal. π
that's it. that's the whole personality. and honestly? we love a girl who knows her lane.
π¦ SYNOPSIS π¦
#include <SDL3/SDL_stdinc.h>
#define SDL_PRIx64 "llx"
look at her. one include, one define. so clean, so minimal, so effortless. π«Ά
πΈ DESCRIPTION πΈ
so here's the tea β: SDL_PRIx64 is a macro that expands to the format specifier you need to print a Uint64 as lower-case hexadecimal. it's giving "I gotchu, bestie, you don't have to guess what your platform's compiler thinks uint64_t is."
Use it like this:
SDL_Log("There are %" SDL_PRIx64 " bottles of beer on the wall.", bottles);
see how she slots right into that format string? % then the macro then the rest of your format spec. the way that works is literally just string-literal concatenation at compile time. so "%" and SDL_PRIx64 smoosh together into "%llx" before the compiler even blinks. β¨
and yeah β you could raw-dog %llx yourself if you want, but SDL_PRIx64 is the one that's portable and won't ghost you on some random architecture. iykyk. π₯
no notes, no gotchas listed, no warnings. just a good girl doing a good job. π
π AVAILABILITY π
This macro is available since SDL 3.2.0. so if you're on anything older than that, she simply did not exist yet. tragic. upgrade, bestie. π¦
π SEE ALSO π
nothing else listed on this page, bestie β SDL_PRIx64 is a solo act and she is thriving as a main character. π
okay and that's the whole page!! simple, iconic, done. this one came to you straight from Simple Directmedia Layer, version SDL 3.4.18 β mwah, slay, periodt. πβ¨ππ«Ά
π¦ 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