al_ustr_insert_chr(3)
π al_ustr_insert_chr(3) β the insert-a-code-point girlie π
okay so this is al_ustr_insert_chr(3) from the Library Functions Manual, and yes bestie, weβre folding that manual-name energy right in here instead of doing a boring copy-paste header line π«Άβ¨
πΈ NAME πΈ
al_ustr_insert_chr β Allegro 5 API. literally the βput one code point into this string at this byte offsetβ function, and sheβs iconic for it π
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
size_t al_ustr_insert_chr(ALLEGRO_USTR *us, int pos, int32_t c)
π¦ DESCRIPTION π¦
Soooo hereβs the vibe: al_ustr_insert_chr inserts a code point into us, beginning at byte offset pos. and pos cannot be less than 0 β like, thatβs the rule, no cap π¨
If pos is past the end of us, then the space between the end of the string and pos gets padded with NUL ('\0') bytes. yes, NUL bytes, bestie β itβs giving βweβre filling the gapβ energy π
Returns the number of bytes inserted, or 0 on error. so if you get 0, thatβs the error signal, periodt π
π SEE ALSO π
al_ustr_insert(3), al_ustr_insert_cstr(3)β the other insert references, go check βem out π
Sign-off π: source/version is the Allegro reference manual, and the page didnβt list a date, so thereβs no date to report β thatβs the footer tea βπ
π¦ 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