al_ustr_find_set(3alleg5)

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

✨ NAME ✨

al_ustr_find_set β€” Allegro 5 API πŸ’–

okay so real talk, this is a page straight out of the Allegro reference manual, and it's about one very specific lil' string-hunting function. stay with me bestie, it's short and it slays.


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

int al_ustr_find_set(const ALLEGRO_USTR *us, int start_pos, const ALLEGRO_USTR *accept)

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe. al_ustr_find_set goes looking through us, starting at the byte offset start_pos, hunting for the first code point that shows up in accept too. Like, accept is the guest list and us is the crowd β€” this function finds the first person in the crowd who's actually on the list. πŸ’…

If it finds one, you get the position back. If nobody on the list shows up? You get -1. That's it. That's the whole function. no cap.

heads up: start_pos is a byte offset, and accept is a whole ALLEGRO_USTR you're matching any of its code points against β€” not the whole string. πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie 🫢 this was al_ustr_find_set(3alleg5) from the Allegro reference manual, mwah πŸ’– go find your set, you've got this ✨

πŸ“¦ where this page comes from