fmt_ulong(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

okay so bestie, this is the Library Functions Manual page for fmt_ulong(3) and it's literally about turning numbers into text, no cap πŸ’–


πŸ’– NAME πŸ’–

  • fmt_ulong β€” write an ASCII representation of an unsigned long integer

✨ SYNTAX ✨

#include <libowfat/fmt.h>

size_t fmt_ulong(char *dest,unsigned long source);

🌸 DESCRIPTION 🌸

okay so like, fmt_ulong takes your source (an unsigned long integer, bestie) and writes an ASCII representation of it to dest. We're talking base 10, digits '0' through '9' only β€” no fancy hex nonsense here. It returns the number of bytes it actually wrote. Slay.

Heads up: fmt_ulong does not append \0. So don't go expecting a null terminator, okay? It's giving raw digits, not a C string. πŸ™ˆ

If dest equals FMT_LEN (i.e. is zero), then fmt_ulong doesn't write anything β€” instead it returns the number of bytes it would have written. That's your little sneak peek at the length, iconic.

And for convenience, fmt.h defines the integer FMT_ULONG to be big enough to contain every possible fmt_ulong output plus \0. Periodt. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie! the footer just says fmt_ulong(3) (no extra source/version/date drama), so that's the cute sign-off β€” catch you in the next manpage πŸ’–βœ¨πŸ¦‹πŸ’