al_ustr_find_str(3)

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

🌸 NAME 🌸

al_ustr_find_str β€” Allegro 5 API, bestie πŸ’… this is the string-finding girlie from the Allegro reference manual.


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

int al_ustr_find_str(const ALLEGRO_USTR *haystack, int start_pos,
   const ALLEGRO_USTR *needle)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: you've got a haystack string and a needle string, and you want the first occurrence of needle inside haystack, starting from byte offset start_pos β€” and yes, that start position is inclusive, periodt πŸ’–.

If it finds the occurrence, it returns the byte offset of that occurrence. If it doesn't find it, you get -1, and honestly? We've all been there 😭.


πŸ’– SEE ALSO πŸ’–


mwah πŸ’‹ cute little sign-off: this one's from the Allegro reference manual, repping the Allegro 5 API β€” al_ustr_find_str(3) out πŸŽ€βœ¨ (the footer didn't hand us a date, so no invented tea from me, bestie 🫢)

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