al_ustr_prev_get(3)
π al_ustr_prev_get(3) π
okay bestie, we're in the Library Functions Manual and this little icon is an Allegro 5 API page. no cap, it's giving βtiny string utility with big main character energy.β π¦
πΈ NAME πΈ
al_ustr_prev_getβ Allegro 5 API π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
int32_t al_ustr_prev_get(const ALLEGRO_USTR *us, int *pos)
π¦ DESCRIPTION π¦
okay so here's the tea: al_ustr_prev_get finds the beginning of a code point before the byte offset at *pos, then returns it. π«Ά it's literally doing a pre-increment, so don't get it twisted, bestie. β¨
On success? it returns the code point value. iconic. π
If pos was out of bounds (say, past the end of the string), you get -1 back. π
On an error β like an invalid byte sequence β you get -2. π
And just like with al_ustr_prev(3), invalid byte sequences may be skipped while advancing. so yeah, the advance can vibe right past them; that's the heads-up, fr fr. π
π SEE ALSO π
al_ustr_get_next(3)β the next little function in your string journey, go bestie π¦
xoxo, the Allegro reference manual π β that's the source/version tea; the footer didn't hand us a date, so we're not inventing one, periodt π π
π¦ 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