SCANF_L(3)
πΈ NAME πΈ
Okay bestie, meet the _l scan squad: scanf_l, fscanf_l, sscanf_l, vfscanf_l, vscanf_l, and vsscanf_l β itβs giving input format conversion π
β¨. This is the SCANF_L(3) page, hanging out in the Library Functions Manual, and yes, itβs literally the locale-flavored scan family π«Ά.
π¦ LIBRARY π¦
Library check: Standard C Library (libc, -lc) β thatβs the whole vibe π§π.
β¨ SYNOPSIS β¨
Copy-paste era, but keep it exact bestie β every line and every restrict stays right where it is:
#include <stdio.h>
#include <xlocale.h>
int
scanf_l(locale_t loc, const char * restrict format, ...);
int
fscanf_l(FILE * restrict stream, locale_t loc,
const char * restrict format, ...);
int
sscanf_l(const char * restrict str, locale_t loc,
const char * restrict format, ...);
int
vfscanf_l(FILE * restrict stream, locale_t loc,
const char * restrict format, va_list ap);
int
vscanf_l(locale_t loc, const char * restrict format, va_list ap);
int
vsscanf_l(const char * restrict str, locale_t loc,
const char * restrict format, va_list ap);
π DESCRIPTION π
So the above functions scan input according to a specified format, but they do it in the locale loc π. They behave the same way as the versions without the _l suffix, except they use the specific locale instead of the global or per-thread locale π. For the full tea, see the specific manual pages β iykyk π.
π₯ SEE ALSO π₯
Go read those if you want the deeper lore π.
β STANDARDS β
Heads up: these functions do not conform to any specific standard, so they should be considered as non-portable local extensions π. Slay locally, but donβt expect them to travel everywhere, fr fr.
π HISTORY π
These functions first appeared in Darwin and were first implemented in FreeBSD 9.1 π¦β¨. Little icon behavior.
Cute sign-off time: this pageβs footer tea is Debian and the date April 8, 2012 ππ. Thatβs the source/version-and-date moment, wrapped up with a bow π«ΆπΈ.
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2012 Isabell Long <issyl0@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms