get_config_string man page

get_config_string — Retrieves a string from the configuration file. Allegro game programming library.


#include <allegro.h>

const char *get_config_string(const char *section, const char *name, const char *def);


Retrieves a string variable from the current config file. The section name may be set to NULL to read variables from the root of the file, or used to control which set of parameters (eg. sound or joystick) you are interested in reading. Example:

const char *lang = get_config_string("system", "language", "EN");

Return Value

Returns a pointer to the constant string found in the configuration file. If the named variable cannot be found, or its entry in the config file is empty, the value of `def' is returned.

See Also

set_config_file(3), set_config_string(3), get_config_argv(3), get_config_float(3), get_config_hex(3), get_config_int(3), get_config_id(3), get_config_text(3), exconfig(3)

Referenced By

exconfig(3), get_config_argv(3), get_config_float(3), get_config_hex(3), get_config_id(3), get_config_int(3), get_config_text(3), list_config_entries(3), list_config_sections(3), reload_config_texts(3), set_config_data(3), set_config_file(3), set_config_string(3).

version 4.4.2 Allegro Allegro manual