scan_short(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_short β€” bestie edition πŸ’–

okay so this is the scan_short(3) page from the Library Functions Manual, and honestly? it's a lil legend. let's get into it 🫢


✨ NAME ✨

scan_short β€” parses an integer in decimal ASCII representation. literally that's the whole job. she reads a number, she tells you how much she read. iconic behavior πŸ’…


🌸 SYNTAX 🌸

#include <libowfat/scan.h>

size_t scan_short(const char *src, short int *dest);

no cap, that's the whole vibe. one include, one function, zero drama ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: scan_short parses a short integer in decimal ASCII representation from src and writes the result into dest.

and then β€” and this is the part that matters β€” it returns the number of bytes read from src. so it's like, "here's your number, and also here's how far I walked to get it" πŸšΆβ™€οΈπŸ’–

heads up: dest gets written to, so make sure it's actually pointing at a real short int you're allowed to touch. don't be handing her random pointers, that's not the move πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:

go read them too, they're all serving πŸ’œ


and that's the page!! this was the scan_short(3) page, living under the Library Functions Manual umbrella β€” no date or version info on this one, she's timeless like that 🌈✨ stay parsed, bestie πŸ’…πŸŽ€