get_uformat(3)

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

✨ get_uformat β€” the Allegro manual ✨

okay bestie, so this one lives in the Allegro manual section 3, and it's literally just here to tell you what text encoding format is currently selected in the Allegro game programming library. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

int get_uformat(void);

πŸ’– DESCRIPTION πŸ’–

so like, get_uformat() finds out what text encoding format is currently selected. that's the tea. πŸ«–

ngl, this function is probably useful only if you're writing an Allegro addon that deals with text strings and you use a different codepath for each possible format. so if that's your situation β€” bestie, this is your moment. if not, no cap, you can probably scroll on. πŸ’…

here's the example, exactly as written:

switch(get_uformat()) {
   case U_ASCII:
      do_something();
      break;
   case U_UTF8:
      do_something_else();
      break;
   ...
}

see how it's giving "pick a lane, any lane"? iconic behaviour honestly. ✨


πŸ‘‘ RETURN VALUE πŸ‘‘

it returns the currently selected text encoding format. 🌈

and if you're sitting there like "okay but what ARE the formats tho" β€” go read the documentation of set_uformat(), it has the whole list of encoding formats. iykyk. πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹


k bye, this page was brought to you by Allegro, version 4.4.3, and it's the get_uformat(3) era fr fr β€” go switch your formats, main character πŸ’–

πŸ“¦ where this page comes from