al_ustr_find_cset(3alleg5)

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

✨ NAME ✨

al_ustr_find_cset β€” bestie, it's part of the Allegro 5 API πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

int al_ustr_find_cset(const ALLEGRO_USTR *us, int start_pos,
   const ALLEGRO_USTR *reject);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you've got this string us, right? And you're like, "bestie, where's the first code point that is NOT on my little reject list?" That's literally what this function does πŸ’–

It hunts through us, starting from the byte offset start_pos, and finds the very first code point that does not match any code point in reject. In other words β€” and this is the iconic part β€” it finds a code point in the complementary set of reject ✨

And what does it give you back? The byte position of that code point, if there even is one. If there isn't? It hits you with a -1. no cap 😭


πŸ‘‘ SEE ALSO πŸ‘‘


k byeeee, this lil page came straight out of the Allegro reference manual, the al_ustr_find_cset(3alleg5) one πŸŽ€ stay slay, go find those complementary code points, mwah 🫢

πŸ“¦ where this page comes from