al_ustr_set_chr(3)
β¨ NAME β¨
al_ustr_set_chr β Allegro 5 API, coming at you from the Library Functions Manual π
π SYNOPSIS π
#include <allegro5/allegro.h>
size_t al_ustr_set_chr(ALLEGRO_USTR *us, int start_pos, int32_t c)
π¦ DESCRIPTION π¦
okay so bestie, here's the vibe: this function replaces the code point beginning at byte offset start_pos with c. π
start_pos cannot be less than 0 β hard no, no cap.
If start_pos is past the end of us, then the space between the end of the string and start_pos gets padded with NUL ('\0') bytes. β¨
If start_pos is not the start of a valid code point, that's an error β and the string will be unmodified. The function does not mess with it, periodt. π
On success, it returns the number of bytes written, i.e. the offset to the following code point. On error, it returns 0.
π SEE ALSO π
xoxo, source/version: Allegro reference manual π β <al_ustr_set_chr>(3)>; date: not listed in the footer, so we're not inventing one, bestie πβ¨
π¦ 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