https://github.com/reybits/ini-file
A simple C++ class for reading and writing INI files.
https://github.com/reybits/ini-file
Last synced: about 2 months ago
JSON representation
A simple C++ class for reading and writing INI files.
- Host: GitHub
- URL: https://github.com/reybits/ini-file
- Owner: reybits
- License: mit
- Created: 2025-02-21T12:59:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-21T13:32:32.000Z (over 1 year ago)
- Last Synced: 2025-03-14T16:46:07.927Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Non-Destructive INI File Parser
A simple C++ class for reading and writing INI files.
## Usage
```cpp
ini::cIni ini;
// read from ini-file
{
ini::cFile file;
if (file.open("input.ini"))
{
ini.read(&file);
}
}
// get and set
{
// returns key value or nullptr
const char* value = ini.getString("section_name", "key_name"));
ini.setString("section_name", "key_name", "new key value");
}
// write to ini-file
{
ini::cFile file;
if (file.open("output.ini", "wb"))
{
ini.save(&file);
}
}
```
***
```
Copyright © 2000-2017 Andrey A. Ugolnik. All Rights Reserved.
https://www.ugolnik.info
andrey@ugolnik.info
```