uwidth(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ uwidth(3) ✨

okay bestie, welcome to the Allegro manual πŸ’– this one's a lil baby page but she's important, i promise. it's a low level helper function for testing Unicode text data, straight out of the Allegro game programming library. yes, the game library. yes, she does Unicode. we love a multitalented queen πŸ‘‘


🌸 NAME 🌸

uwidth β€” low level helper function for testing Unicode text data. that's it. that's the whole job. she's from the Allegro game programming library and she's here to help πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

int uwidth(const char *s);

that's the whole vibe. one include, one function, one const char *s. no cap 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

low level helper function for testing Unicode text data.

fr fr, that's the entire description. she's low level, she's a helper, and she's all about peeking at your Unicode text data. think of her as the girl in the group chat who can tell you exactly how much space the first character in a string is taking up. main character energy, minimal words ✨


⭐ RETURN VALUE ⭐

she returns the number of bytes occupied by the first character of the specified string, in the current encoding format.

so like β€” first character only, bestie. not the whole string. the first one. and the byte count depends on whatever encoding you're rolling with at the moment 🌈


πŸ’œ SEE ALSO πŸ’œ

the rest of the Unicode girlies, go say hi:


πŸ’€ reminder: this is a low level helper. she's not here to hold your hand, she's here to count bytes. use her wisely, icon πŸ‘‘

and that's the page!! brought to you by Allegro, version 4.4.3 πŸŽ€ ty for reading bestie, go write some Unicode-safe code and slay the day away πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from