al_ustr_append(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ al_ustr_append ✨

okay bestie, welcome to the Allegro 5 API reference manual, page al_ustr_append(3alleg5) πŸ’– this one's a lil baby function but it's lowkey iconic, so let's get into it 🫢


🌸 NAME 🌸

al_ustr_append β€” Allegro 5 API


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

bool al_ustr_append(ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2)

πŸ’… DESCRIPTION πŸ’…

So the whole vibe here is: you take us2 and you append it to the end of us1. That's it. That's the function. Gluing one string onto the back of another, like adding a charm to your already-cute bracelet ✨

It returns true on success and false on error. No cap. So like, check that return value, bestie, don't just ignore it and hope for the best 😭

Not me about to tell you the best part though β€” this function can also be used to append an arbitrary buffer, and the way that works is genuinely so satisfying:

ALLEGRO_USTR_INFO info;
al_ustr_append(us, al_ref_buffer(&info, buf, size));

like, you just wrap the raw buffer in a ref and suddenly it's a string you can append. main character energy fr fr πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, iykyk 🌈


and that's the whole page, periodt πŸ’œ this came to you straight from the Allegro reference manual, al_ustr_append(3alleg5), stay slay and always free your ALLEGRO_USTRs πŸŒΈπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from