scan_long(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– scan_long β€” bestie edition πŸ’–

okay so welcome to scan_long(3) from the Library Functions Manual ✨ she's a lil function, she's lowkey iconic, and she does exactly one job and does it slayfully πŸ’…


🌸 NAME 🌸

scan_long β€” parse an long integer in decimal ASCII representation πŸ¦‹

(and yes bestie, the original really does say "an long", we're keeping it fr fr, no cap, we do not edit the ancestors πŸ’œ)


✨ SYNTAX ✨

#include <libowfat/scan.h>

size_t scan_long(const char *src,long *dest);

look at her πŸ₯Ή so clean. so simple. main character energy for real.


πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the tea πŸ“ β€” scan_long parses a long integer in decimal ASCII representation from src and writes the result into dest. that's the whole vibe. that's the whole function.

and then she returns the number of bytes read from src πŸ‘‘ like a little receipt. "here's what I ate, here's how much of it I ate." periodt.

so basically: give her a string, give her a spot to drop the number, and she'll tell you how many bytes of the string she actually consumed πŸ’– she's not greedy, she's precise. we love a boundaries queen.

ngl, watch out β€” she writes into dest so make sure that pointer is real and pointing at somewhere you're allowed to write. she's not checking, bestie, that's your job πŸ™ˆ

🌈 SEE ALSO 🌈

she's got a whole friend group, go say hi πŸ’«


and that's the page!! 🫢 this was scan_long(3) from the Library Functions Manual, and the footer just says scan_long(3) again because the whole page is obsessed with herself honestly πŸ’… no version, no date, just vibes β€” she said "the name is the date" and honestly? valid. mwah πŸ’‹βœ¨πŸŽ€πŸ¦‹