stralloc_catulong0(3)
π 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. πβ¨π¦πΈπ
ππ«Ά
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms