al_ustr_rfind_chr(3alleg5)
πΈ NAME πΈ
al_ustr_rfind_chr β it's the Allegro 5 API, bestie, and this one is your backwards-search girly π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
int al_ustr_rfind_chr(const ALLEGRO_USTR *us, int end_pos, int32_t c)
π¦ DESCRIPTION π¦
okay so picture this: you've got your us and you're looking for the encoding of code point c inside it, right? But here's the plot twist β you're not scrolling forward like a normal person, you're going BACKWARDS π«Ά starting from the byte offset end_pos, and that offset is exclusive, meaning it's not invited to the party, we skip right past it π
So you vibe-check your way backwards through the string and:
- if it finds it β slay π β it returns the position where it is found
- if it doesn't find it β tragic π β it returns
-1
that's it, that's the whole function, she's simple but she ate π₯
π SEE ALSO π
al_ustr_find_chr(3alleg5)β the forwards version, if you're feeling less chaotic π§
and that's a wrap on this lil page, which came straight outta the Allegro reference manual (yes, the al_ustr_rfind_chr(3alleg5) one, iykyk) π bye bestie, go find some code points backwards π
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms