SDL_vsscanf(3)
π SDL_vsscanf(3) β SDL3 FUNCTIONS π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we're talking about SDL_vsscanf today. she's the va_list-flavoured twin of SDL_sscanf and she is, lowkey, exactly what you need when you can't touch a C runtime. no cap. π¦
β¨ NAME β¨
SDL_vsscanf β this works exactly like vsscanf() but doesn't require access to a C runtime. it's giving "same energy, no dependencies." π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_stdinc.h>
int SDL_vsscanf(const char *text, const char *fmt, va_list ap);
β¨ DESCRIPTION β¨
so here's the tea π« β this function functions identically to SDL_sscanf(), except it takes a va_list instead of using ... variable arguments. that's it. that's the whole difference. the way she just swaps out the ... for a va_list and keeps everything else the same? iconic. π
β¨ FUNCTION PARAMETERS β¨
textβ the string to scan. must not beNULL. like, seriously, don't. πfmtβ a printf-style format string. must not beNULLeither. she needs her instructions, bestie.apβ ava_listof pointers to values to be filled in with scanned items. this is where the scanned goodies land. π
β¨ RETURN VALUE β¨
returns the number of items that matched the format string. count 'em, that's your number. β
β¨ THREAD SAFETY β¨
it is safe to call this function from any thread. any thread!! go off, you multithreaded main character. π§
β¨ AVAILABILITY β¨
this function is available since SDL 3.2.0. if you're on anything older, sorry babe, she's not there yet. π
πΈ reminder before you go:textandfmtare both "must not beNULL" territory. respect the rules and she'll respect you. π«Ά
Simple Directmedia Layer made this one, and this page is straight outta SDL 3.4.18, dated in the SDL_vsscanf(3) era. mwah. take care of her, she's iconic. πβ¨
π¦ 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