al_get_first_config_entry(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ al_get_first_config_entry ✨

okay bestie, welcome to the Allegro 5 API β€” this one's a lil config-peeking queen and she's so easy once you get the vibe πŸ’…


🌸 NAME 🌸

al_get_first_config_entry β€” she's your Allegro 5 API girlie and she's here to hand you the very first key in a section πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

char const *al_get_first_config_entry(ALLEGRO_CONFIG const *config,
   char const *section, ALLEGRO_CONFIG_ENTRY **iterator)

πŸ’– DESCRIPTION πŸ’–

So here's the tea: this function returns the name of the first key in the given section inside the given config. That's it. That's the whole job. Slay. πŸ‘‘

But if that section is empty? She returns NULL. No keys, no name, nothing to give you, not even a crumb 😭

The iterator works exactly like the one for al_get_first_config_section(3alleg5) β€” same energy, same mechanics, fr fr 🫢

⚠️ okay this part MATTERS, do not skip it: the returned string and the iterator are only valid as long as no change is made to the passed ALLEGRO_CONFIG(3alleg5). Touch the config, change the config, and poof πŸ’€ β€” your string and iterator are gone. lowkey a situationship.

⭐ SEE ALSO ⭐


and that's the whole page!! iconic, honestly 🌈

kisses, this was the Allegro reference manual πŸ’œ β€” page al_get_first_config_entry(3alleg5), mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from