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

πŸ’– 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 as array_cat" situation, so go read up on array_cat if 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:


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. πŸ’–πŸŽ€πŸ§š