al_ustr_prev_get(3alleg5)

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

✨ al_ustr_prev_get(3alleg5) ✨

okay bestie, welcome to the al_ustr_prev_get(3alleg5) page β€” yes, that's the manual name and the function, all up in here. This is Allegro 5 API business, and we're about to get into it. 🫢


🌸 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 πŸ’…

So like, this function finds the beginning of a code point before byte offset *pos, then returns it. Note this performs a pre-increment. Periodt. πŸ’…

On success it returns the code point value. If pos was out of bounds (e.g. past the end of the string), it returns -1. On an error, such as an invalid byte sequence, it returns -2. 😭

⚠️ Also, as with al_ustr_prev(3alleg5), invalid byte sequences may be skipped while advancing. So don't be surprised if it lowkey slides past them. 🧚

πŸ”₯ SEE ALSO πŸ”₯


Allegro reference manual β€” that's the source/version tea, and there's no date on this page so I'm not inventing one. Stay iconic, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from