WCSTOL(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… WCSTOL(3) β€” the girlies' guide to wide-char number converting ✨

okay so bestie, you're in the WCSTOL(3) part of the manual and lemme tell you, this one's a whole family reunion 🫢

🌸 NAME

wcstol, wcstoul, wcstoll, wcstoull, wcstoimax, wcstoumax β€” the icons that convert a wide character string value into a long, unsigned long, long long, unsigned long long, intmax_t or uintmax_t integer πŸ‘‘

πŸŽ€ LIBRARY

Standard C Library (libc, -lc) β€” yeah she lives in libc, nothing exotic πŸ’–

✨ SYNOPSIS

#include <wchar.h>

long
wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr,
    int base);

unsigned long
wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr,
    int base);

long long
wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr,
    int base);

unsigned long long
wcstoull(const wchar_t * restrict nptr, wchar_t ** restrict endptr,
    int base);

#include <inttypes.h>

intmax_t
wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr,
    int base);

uintmax_t
wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr,
    int base);

like, every single one takes the same three args β€” nptr, endptr, base β€” she's consistent, we love that for her πŸ¦‹

πŸ’œ DESCRIPTION

so here's the tea β˜• wcstol(), wcstoul(), wcstoll(), wcstoull(), wcstoimax() and wcstoumax() are literally the wide-character versions of strtol(), strtoul(), strtoll(), strtoull(), strtoimax() and strtoumax() respectively. same energy, but wide chars πŸ’…

and because nobody needs me re-explaining the whole thing (ok maybe someone does but it's already been done), the manpage is like: refer to their manual pages (for example strtol(3)) for details. so go read those, bestie, that's where the real lore is πŸ“–βœ¨

🌈 SEE ALSO

go give them a read, they're linked for a reason 🫢

πŸ‘‘ STANDARDS

wcstol(), wcstoul(), wcstoll(), wcstoull(), wcstoimax() and wcstoumax() conform to ISO/IEC 9899:1999 ("ISO C99") β€” certified standards-compliant, no cap πŸŽ“πŸ”₯


and that's the whole page, diva πŸ’– this one's from Debian, dated September 7, 2002 β€” yes she's an older queen but she still serves βœ¨πŸ‘‘ bye bestie, go convert some wide strings πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from