SDL_sscanf(3)
π SDL_sscanf(3) β SDL3 FUNCTIONS π
okay bestie, gather round, because this one is literally just sscanf() but make it β¨portableβ¨. Welcome to the SDL_sscanf page, you're gonna eat this up.
β¨ NAME β¨
SDL_sscanf β this works exactly like sscanf() but doesn't require access to a C runtime. no cap. same energy, zero C-runtime dependency. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_stdinc.h>
int SDL_sscanf(const char *text, const char *fmt, ...);
like, that's it. that's the whole vibe. π¦
π DESCRIPTION π
Scan a string, matching a format string, converting each '%' item and storing it to pointers provided through variable arguments.
fr fr that's the whole thing β you hand it some text, you hand it a fmt, and it goes through matching stuff up and dumping the converted results into the pointers you passed in. lowkey iconic behaviour honestly.
π FUNCTION PARAMETERS π
textβ the string to scan. Must not beNULL. like, seriously, don't. πfmtβ aprintf-style format string. Must not beNULL. same deal, bestie....β a list of pointers to values to be filled in with scanned items. yes you have to actually pass pointers, we're not doing magic here β¨
β RETURN VALUE β
Returns the number of items that matched the format string. that's your count, that's your receipt, periodt. π―
π§ THREAD SAFETY π§
It is safe to call this function from any thread.
so go off, call it from wherever, whenever. main character energy on every thread. π
π AVAILABILITY π
This function is available since SDL 3.2.0. so if you're on something olderβ¦ it's giving outdated, babe π go update.
k that's the whole page bestie, go forth and scan responsibly π«Ά
Simple Directmedia Layer β SDL 3.4.18 β SDL_sscanf(3) π mwah, love u, 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