al_utf16_width(3alleg5)
π al_utf16_width β Allegro 5 API π
okay bestie, welcome to the al_utf16_width(3alleg5) page, you're gonna eat this one UP β¨
π NAME π
al_utf16_width β it's an Allegro 5 API thing, and it's literally just here to tell you how thicc a character gets when it goes to UTF-16 school π¦
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
size_t al_utf16_width(int c)
like yes, one include, one function, no drama π
π DESCRIPTION π
so here's the tea, bestie π β this function takes a code point and tells you the number of bytes it would take up once it's been encoded in UTF-16.
and the answer is genuinely so simple it's giving minimalism:
- for legal code point values, you're getting either
2or4bytes, periodt. no in-between, no chaos, just those two options π - for anything that isn't a legal code point value? it returns
0π
that's it. that's the whole function. no cap, it's iconic for how unbothered it is.
ngl if you get a 0 back, that's your sign that whatever you passed in was not a legal code point, so maybe don't go encoding it anywhere π
π«Ά SEE ALSO π«Ά
al_utf16_encode(3alleg5)β the one that actually does the encoding, the main character of this little squadal_utf8_width(3alleg5)β same energy, different encoding, UTF-8 girlies rise β¨
and that's the whole page, bestie!! this came to you straight from the Allegro reference manual, page al_utf16_width(3alleg5) β go forth and measure your code points 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