stralloc_catulong0(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_catulong0 β€” bestie's guide to yeeting integers into a stralloc πŸ’–

okay so real talk, this page lives in the Library Functions Manual, section 3 of the libowfat lore, and it's literally just about stralloc_catulong0(3) β€” the girl who takes your number and sticks it on the end of your string. no cap. ✨


🌸 NAME 🌸

stralloc_catulong0 β€” append an integer to a stralloc, slay πŸ’…


πŸ¦‹ SYNTAX πŸ¦‹

like, this is the whole vibe, copy it exactly bestie:

#include <libowfat/stralloc.h>

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

✨ DESCRIPTION ✨

so here's the tea πŸ“: stralloc_catulong0 takes in and converts it into a string using fmt_ulong0, then appends that result onto sa, and it's out here allocating memory as necessary like the icon it is. no stress, it handles the glow-up for you. πŸ‘‘

if there was a memory allocation failure, stralloc_catulong0 returns 0. otherwise it returns 1. that's it. that's the whole story. 🫢

not me casually malloc-ing on your behalf β€” yes bestie, it can fail, and if it does you get a 0 and you should lowkey check for it. 😭

πŸ’œ RETURN VALUE πŸ’œ

  • 1 β€” success, we ate πŸ”₯
  • 0 β€” memory allocation failure, it's giving tragedy πŸ’€

🌈 SEE ALSO 🌈

  • fmt_ulong0(3) β€” the other half of this duo, go read her page too iykyk ✨

and that's the whole page bestie!! πŸŽ€ this was stralloc_catulong0(3) from the Library Functions Manual, and yeah the footer just says her name again because she's the main character and doesn't need a date to be iconic. periodt. πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ’…πŸ‘‘πŸ«Ά