wcstoimax(3)

✨ wcstoimax β€” bestie, we're converting wide strings to integers ✨

okay so like. <pink>wcstoimax</pink> and <pink>wcstoumax</pink> are literally the moment you need to turn a wide-character string into a big ol' integer. that's the whole vibe. πŸ’–


πŸ“š LIBRARY

it lives in the Standard C library β€” link it with -lc, babes. πŸŽ€


🌸 SYNOPSIS

#include <stddef.h>
#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);

periodt. that's the whole signature, no notes. 🫢


πŸ’… DESCRIPTION

no cap, these two are exactly like wcstol(3) and wcstoul(3)… except β€” and this is the iconique part β€” they hand you back a value of type intmax_t and uintmax_t respectively. ✨

that's it. that's the tea. same energy, bigger int vibes. πŸ‘‘


πŸ¦‹ ATTRIBUTES

if you're like "bestie what even is this section", go read attributes(7) for the explanation of the terms. πŸ’œ

  • wcstoimax(), wcstoumax() β€” thread safety: MT-Safe locale 🌈

⭐ STANDARDS

  • C11
  • POSIX.1-2008

both. slay. πŸ’…


πŸ•°οΈ HISTORY

  • POSIX.1-2001
  • C99

she's been around a while and she's still serving. πŸ‘‘


πŸ‘€ SEE ALSO

go read these too, iykyk. πŸ“


mwah πŸ’‹ this little explainer came to you straight from Linux man-pages 6.20, dated 2026-02-08 β€” so yeah, fresh, current, and honestly? iconic. take care of her and she'll take care of your wide strings πŸ§šπŸ’–

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: GPL-2.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms