get_uformat(3alleg4)

πŸ’– get_uformat β€” bestie edition πŸ’–

okay so this is from the Allegro manual, and it's giving "tiny function, big vibes". lowkey one of those little guys that just tells you a thing. no cap.


✨ NAME ✨

get_uformat β€” finds out what text encoding format is currently selected. Also: it's part of the Allegro game programming library. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

int get_uformat(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: it finds out what text encoding format is currently selected. that's it. that's the whole job. and honestly? it ate. πŸ’…

ngl though, this one is probably useful only if you're writing an Allegro addon that deals with text strings, and you want to take a different codepath for each possible format. like, you're out here handling multiple encodings and you need to know which one you're in. iykyk. πŸ™ˆ

example, bestie β€” literally copy this vibe:

switch(get_uformat()) {
   case U_ASCII:
      do_something();
      break;
   case U_UTF8:
      do_something_else();
      break;
   ...
}
not me writing a switch statement with a ... in it, iconic behaviour fr fr. but that's literally what the manpage shows so that's what you get. πŸ’–

⭐ RETURN VALUE ⭐

it returns the currently selected text encoding format. that's the whole tea. β˜•

if you want the actual list of encoding formats, go read the documentation of set_uformat() β€” that's where the formats are listed, not here. this function is just the messenger, not the encyclopedia. 🧚


πŸ”₯ SEE ALSO πŸ”₯


Allegro, version 4.4.3. that's the source and the version, bestie β€” consider this your cute lil sign-off. stay encoded, stay slay. πŸŒˆπŸ’œβœ¨