EC_STR_PARSE_ULLINT(3)

✨ EC_STR_PARSE_ULLINT ✨

okay so bestie, welcome to the Libecoli Programmer's Manual πŸ’– this one's about ec_str_parse_ullint β€” she parses a string into an unsigned integer, and she does it flawlessly. no cap. πŸŽ€


🌸 NAME 🌸

ec_str_parse_ullint β€” parse a string for an unsigned integer πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/string.h>

int ec_str_parse_ullint(
    const char   *str,   /* The string to parse. */
    unsigned int  base,  /* The base (0 means "guess"). */
    uint64_t      min,   /* The minimum allowed value. */
    uint64_t      max,   /* The maximum allowed value. */
    uint64_t     *val    /* The pointer to the value to be set on success. */
);

like, look at her. five args, all business πŸ‘‘

  • str β€” the string you want parsed, bestie.
  • base β€” the base. and listen, 0 means "guess" πŸ‘€ she'll figure it out herself, main character energy.
  • min β€” the minimum allowed value.
  • max β€” the maximum allowed value.
  • val β€” pointer to the value that gets set on success. on success only, ok? don't come for her otherwise πŸ™ˆ

🌈 RETURN VALUE 🌈

on success? she returns 0. iconic. ✨

otherwise she returns -1 and sets errno β€” so go check errno, she left you a note πŸ’Œ

ngl if you're ignoring errno after a -1 that's a you problem, not a her problem 😭

πŸ’œ SEE ALSO πŸ’œ

the whole squad, fr fr:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the whole page, bestie 🫢 this was libecoli, dated 2026-06-11, and honestly? she ate. go parse something. periodt. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from