array_cats(3)
π array_cats(3) π
okay bestie, welcome to the Library Functions Manual, section 3, where we talk about array_cats β the little function that could, and does, and slays. it appends C strings to arrays. that's it. that's the gig. and honestly? iconic. π
β¨ NAME β¨
array_cats β append C string to an array π«Ά
πΈ SYNTAX πΈ
first things first, you gotta bring the header in. no header, no function, that's the law:
#include <libowfat/array.h>
void array_cats(array* x,const char* y);
and here's the whole vibe in action, a lil baby example so you can see it living its truth:
array x;
array_cats(&x,"fnord");
literally so simple. she takes a pointer to your array and a string, and she goes. π
π¦ DESCRIPTION π¦
okay so here's the tea, and the tea is actually pretty short because this function is not complicated:
array_cats appends the contents of the 0-terminated string y to the array x. and listen β she does not include that terminating 0 byte. like, the 0 stays home. she's not bringing it. so what lands in your array is the string's contents, no null terminator, no baggage, periodt. β¨
and if things go wrong? if the whole thing just does not work out? array_cats handles failure the same way as array_cat. so if you wanna know what happens when the vibes go bad, that's where you look, bestie. iykyk. π
heads up: this is a "handles failure the same way asarray_cat" situation, so go read up onarray_catif you need the full deets on what failure actually looks like here.
π SEE ALSO π
your reading list, your little syllabus, your group chat of related functions β go be nosy, they're all friends:
array_allocate(3)array_get(3)array_fail(3)array_reset(3)array_cat(3)array_catb(3)array_cats0(3)array_cate(3)array_cat0(3)
okay that's the whole page, bestie, we ate and left absolutely no crumbs πβ¨ this was array_cats(3) from the Library Functions Manual, section 3, and that's the last line of the page so you know we're done. mwah. πππ§
π¦ 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