ugetx(3alleg4)
β¨ ugetx β lowkey the goat of reading Unicode text data β¨
okay bestie, so this is a page from the Allegro manual β that's the 3alleg4 section, iykyk π
β and it's all about ugetx, ugetxc: the low level helper function for reading Unicode text data. Two icons, one job. Allegro game programming library energy fr fr. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
int ugetx(char **s);
int ugetxc(const char **s);
π¦ DESCRIPTION π¦
so here's the tea β β this is a low level helper function for reading Unicode text data. That's the whole vibe. It reads, it advances, it serves. π
and ugetxc? That's the exact same situation but for when you're working with pointer-to-pointer-to-const char data. Different flavor of pointer, same slay. β¨
Here's the example, verbatim, no cap:
char *p = string;
int first_letter, second_letter, third_letter;
first_letter = ugetx(&p);
second_letter = ugetx(&p);
third_letter = ugetx(&p);
see how each call just... moves the pointer along? main character behavior honestly π«Ά
π RETURN VALUE π
It returns the character that s is pointing at, in the current encoding format, and then it advances the pointer to the next character after the one it just returned. So you get your letter and you get progress. Not me being obsessed with a return value π
π SEE ALSO π
the whole friend group fr π
and that's the page, bestie!! πΈ this was Allegro, version 4.4.3 β mwah, kisses, go read the other Unicode helpers, periodt. π β¨ππ¦
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms