al_ustr_append(3alleg5)
β¨ 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 π¦
al_ustr_append_cstr(3alleg5)al_ustr_append_chr(3alleg5)al_ustr_appendf(3alleg5)al_ustr_vappendf(3alleg5)
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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms