Crate gerbil_ini

Source
Expand description

§gerbil-ini

Simple no-std compatible .ini parsing library.

Example usage

use gerbil_ini::{Ini, IniMode};

let some_ini = r#"
; This is a comment.

[My Section]
; Here's a value
some KEY=This is a value!

; Here's another value
anotherkey=This is yet another value!

;commented out=this value isn't real :(

[Another Section]
yourkey=This is a value!
some KEY=This, too, is a value!
anotherkey=//Wow Look At Me I'm A Value\\
"#;

let ini = Ini::parse(some_ini, IniMode::Simple).expect("parse");
let section = ini.get_section("My Section").unwrap();
assert_eq!(section.get("some KEY"), Some("This is a value!"));

Structs§

Ini
Ini parser.
IniSection
Section for an ini.

Enums§

IniMode
Describes a method for parsing ini files.
IniParsingError
An error generated by the ini parser.