Skip to content

martysama0134/win32ini

Repository files navigation

win32ini

header-only ini reader via win32 api using c++ with unicode support

There are two available classes. win32iniA and win32iniW:

using win32iniA = win32ini<std::string, char>;
using win32iniW = win32ini<std::wstring, wchar_t>;

How to use it:

std::map<std::wstring, std::map<std::wstring, std::wstring>> translations;
std::wstring iniPathW = GetIniPathW(); // absolute path of the .ini

// you may properly need to allow unicode in your console to properly display the values
auto wi = win32iniW(iniPathW);
auto& map = wi.GetMap();
for (auto& section : map)
{
	std::wcout << "section " << section.first << '\n';
	for (auto& key : section.second)
	{
		std::wcout << "key " << key.first << '\n';
		translations[section.first][key.first] = key.second;
		std::wcout << "translations[" << section.first << "][" << key.first << "] = " << key.second << '\n';
	}
}

About

header-only ini reader via win32 api using c++ with unicode support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages