Pretty INI

Light library to read/write ini files.

Format

Header / Table / Section

[name]

Variable

myVar = value

Example

```rust use prettyini::{inifile, ini};

// File buffer let mut file = inifile::IniFile::default(); file.setpath("demo.ini");

// Load let mut ini = ini::Ini::default(); ini.load(&mut file).unwrap();

// Access a var and add 1 let mut variter = ini.getrefmut(ini::TABLENAMEROOT, "iter").unwrap(); variter.set(variter.parse::().unwrap() + 1);

// Save the file file.save(&mut ini); ```

Pre/Post Process

In the IniFile you can add some process using a ProcessAction.

Pre Process

Called before assign the file content to the buffer.

```rust let action = Some(Box::new(|buffer| { // Do nothing return buffer; }));

inifile.addpre_process(action); ```

Post Process

Called before saving the file.

```rust let action = Some(Box::new(|buffer| { // Do nothing return buffer; }));

inifile.addpost_process(action); ```

⚠️ Warnings