Pretty INI

Light library to read/write ini files.

Format

Example

``` use prettyini::inifile::IniFile;

let mut file = inifile::IniFile::default(); file.setpath("file_name.ini");

if file.exist() { // Can Load file.load(); }

// Convert to an object easy to use let mut ini = ini::Ini::default(); ini.load(&file);

// Access a variable in the root table // the root table is a table made of element without any header let mut variter = ini.gettablemut(ini::TABLENAMEROOT).unwrap().getvariablerefmut("iter").unwrap(); // Add 1 to the variable value // variter.parse::() is a short way to parse the String variter.value = format!("{}", variter.parse::().unwrap() + 1);

// Give the new file content to the IniFile ini.setbuffer(ini.makeinifilebuffer()); // Write the buffer to the file ini.save(); ```