scan_ushort(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_ushort β€” bestie's guide to snatching an unsigned short out of text πŸ’–

okay so first things first, the manual name is scan_ushort (it lives in section 3, the library-functions girlies 🫢). that's the whole vibe of this page and we're gonna get into it.


✨ NAME ✨

scan_ushort β€” she parses an unsigned short integer that's hanging out in decimal ASCII representation πŸ’…


🌸 SYNTAX 🌸

the way you summon her:

#include <libowfat/scan.h>

size_t scan_ushort(const char *src,unsigned short *dest);

yep that's it, that's the whole incantation ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, and honestly it's not even complicated, she's just that girl:

scan_ushort parses an unsigned short integer in decimal ASCII representation β€” it reads it straight out of src 🌈

then she drops the result into dest like it's a lil gift πŸŽ€

and she returns the number of bytes read from src so you know exactly how much she ate. periodt. πŸ’…

lowkey no cap, that return value is the main character here β€” it's literally the only way you find out how far she got. don't sleep on it bestie 😭

πŸ‘‘ SEE ALSO πŸ‘‘

her girlies, her squad, the ones you should also be checking out:


and that's the whole page bestie!! πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€πŸ’… this iconic lil writeup is filed under scan_ushort(3), so if you ever need her again you know exactly where to look 🫢 mwah, go parse something cute πŸ’œ