al_ustr_size(3alleg5)
π NAME π
al_ustr_size β Allegro 5 API β¨
π«Ά SYNOPSIS π«Ά
#include <allegro5/allegro.h>
size_t al_ustr_size(const ALLEGRO_USTR *us)
πΈ DESCRIPTION πΈ
okay bestie, so al_ustr_size is literally the glow-up you need when you wanna know the size of the string β but in bytes, not vibes π
. It hands you back a size_t, and that number is the byte count, periodt.
And here's the tea π: that byte size is equal to the number of code points in the string if the string is empty or if it contains only 7-bit ASCII characters. So for an empty string or a pure-ASCII moment, bytes and code points are matching, no cap. For anything else, don't assume they're the same, because the function is giving bytes, not code points. π
lowkey important: the equality only holds in those two cases, so don't go applying it to every string you meet, bestie.
π SEE ALSO π
al_ustr_length(3alleg5)β go read that one too, it's the code-point-counting bestie π¦
mwah π this has been your girl signing off from the <strong>Allegro reference manual</strong>, page al_ustr_size(3alleg5) β¨ slay responsibly π
π¦ 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