view src/core/ini.cc @ 312:11adae933b40

locale: remove old unfinished and probably bad spanish translation
author Paper <paper@paper.us.eu.org>
date Tue, 11 Jun 2024 13:19:32 -0400
parents ec0a2b5493f8
children
line wrap: on
line source

#include "core/ini.h"

namespace INI {

std::string GetIniString(const mINI::INIStructure& ini, const std::string& section, const std::string& key, const std::string& def) {
	if (!ini.has(section) || !ini.get(section).has(key))
		return def;

	return ini.get(section).get(key);
}

bool GetIniBool(const mINI::INIStructure& ini, const std::string& section, const std::string& key, bool def) {
	return Strings::ToBool(GetIniString(ini, section, key, ""), def);
}

}