al_ustr_has_prefix_cstr(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

✨ al_ustr_has_prefix_cstr(3) ✨

okay so bestie, this one's from the Library Functions Manual and it's literally the easiest little vibe check in the whole Allegro 5 API β€” like, we're checking if a string starts with another string, that's it, that's the whole thing πŸŽ€


🌸 NAME 🌸

al_ustr_has_prefix_cstr β€” the Allegro 5 API function that tells you whether your ALLEGRO_USTR starts with a plain C string πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

bool al_ustr_has_prefix_cstr(const ALLEGRO_USTR *us1, const char *s2)

like, you give it a const ALLEGRO_USTR * called us1, you give it a const char * called s2, and it hands you back a bool. periodt ✨


πŸ’– DESCRIPTION πŸ’–

Returns true iff us1 begins with s2. 🫢

not "if it contains it", not "if it ends with it" β€” begins with, bestie. it's a prefix check, it's giving very specific main character energy, and it's returning true iff that prefix situation is real. anything else? false. ngl that's the whole function and honestly? obsessed πŸ’…


πŸŽ€ SEE ALSO πŸŽ€


πŸ’€ reminder: it checks whether us1 begins with s2 β€” don't come for me if you were expecting suffix behaviour, that's the other function's job 🧚

and that's the page!! this cutie lives in the Allegro reference manual, filed under al_ustr_has_prefix_cstr(3) β€” catch you in the next one, mwah πŸ“πŸ’–

πŸ“¦ 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