al_ustr_has_suffix(3)
π al_ustr_has_suffix(3) β Allegro 5 API, bestie edition π
okay so imagine you've got two strings and you just need to know if one of them is ending with the other, like a little suffix vibe check β¨ that's literally this function. it lives in the Allegro 5 API, and it's giving "quietly iconic utility function" π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
bool al_ustr_has_suffix(const ALLEGRO_USTR *us1, const ALLEGRO_USTR *us2)
so you pull in allegro5/allegro.h and then you can call al_ustr_has_suffix, which takes two const ALLEGRO_USTR * pointers β us1 and us2 π
β and hands you back a bool.
πΈ DESCRIPTION πΈ
Returns true iff us1 ends with us2. periodt. π
like... that's the whole thing. us1 is your main character string, us2 is the ending you're checking for β and if us1 finishes off with exactly us2 at the end, you get true back π₯ otherwise it's false, no cap.
bestie note: it says iff β that's "if and only if" β sotruehappens exactly whenus1ends withus2, and not a single other time π«Ά
π¦ SEE ALSO π¦
al_ustr_has_suffix_cstr(3)β same energy but for a C string suffix πal_ustr_has_prefix(3)β the opposite end of the string, literally the front-door version π
and that's the whole page, bestie! π this one came straight out of the Allegro reference manual, dated the same as always β so go forth and check your suffixes, you've got this πβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms