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

stralloc_catlong0 πŸ’–

okay bestie, gather round, because we're about to talk about stralloc_catlong0(3) from the Library Functions Manual β€” yes, that's the manual section, she lives in section 3, it's giving "library functions" energy and we're obsessed πŸ’…


✨ NAME ✨

stralloc_catlong0 β€” append an integer to a stralloc πŸŽ€


🌸 SYNTAX 🌸

#include <libowfat/stralloc.h>

int stralloc_catlong0(stralloc* sa, unsigned long int in, size_t n);

like, that's the whole vibe. include the header, call the function, boom. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, fr fr:

stralloc_catlong0 takes in and converts it to a string using fmt_long0, then appends that result to sa, allocating memory as necessary. it's literally just "number goes in, string gets stuck on the end of the stralloc" 🫢

and if there was a memory allocation failure? she returns 0. otherwise 1. no cap.

πŸ‘‘ RETURN VALUE πŸ‘‘

  • 1 β€” success, we ate πŸ’…
  • 0 β€” memory allocation failure, not the moment bestie 😭

🌈 SEE ALSO 🌈

fmt_long0(3) β€” the icon that does the actual number-to-string glow-up ✨


and that's the whole page!! this was the Library Functions Manual edition of stralloc_catlong0(3) β€” she's from section 3, she's a library function, and honestly? iconic behavior. mwah πŸ’‹πŸ’–πŸŒΈ