scan_double(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_double(3) πŸ’–

okay bestie, so we're in the Library Functions Manual, section 3, and the star of today's episode is scan_double β€” the little function that takes a floating point number written out in decimal ASCII and turns it into an actual double. no cap. πŸ¦‹


✨ NAME ✨

scan_double β€” parse a floating point number in decimal ASCII representation πŸ’…


✨ SYNTAX ✨

#include <libowfat/scan.h>

size_t scan_double(const char *src,double *dest);

like, that's it. that's the whole vibe check. πŸŽ€


✨ DESCRIPTION ✨

so here's the tea, bestie: scan_double parses a floating point number in decimal ASCII representation from src, and then it writes the result into dest. πŸ“βœ¨

and the return value? it gives you back the number of bytes read from src. that's a size_t, so it's a count, it's giving "how much of this string did I actually consume". πŸ”₯


✨ SEE ALSO ✨

go read those too, iykyk πŸ‘‘


and that's the whole page, periodt. this was scan_double(3), page of the Library Functions Manual section 3 β€” catch you in the next one, mwah πŸ«ΆπŸ’–πŸŒΈ