gerbil_ini/
lib.rs

1#![no_std]
2
3//! # gerbil-ini
4//!
5//! Simple no-std compatible .ini parsing library.
6//!
7//! Example usage
8//!
9//! ```rust
10//! use gerbil_ini::{Ini, IniMode};
11//!
12//! let some_ini = r#"
13//! ; This is a comment.
14//!
15//! [My Section]
16//! ; Here's a value
17//! some KEY=This is a value!
18//!
19//! ; Here's another value
20//! anotherkey=This is yet another value!
21//!
22//! ;commented out=this value isn't real :(
23//!
24//! [Another Section]
25//! yourkey=This is a value!
26//! some KEY=This, too, is a value!
27//! anotherkey=//Wow Look At Me I'm A Value\\
28//! "#;
29//!
30//! let ini = Ini::parse(some_ini, IniMode::Simple).expect("parse");
31//! let section = ini.get_section("My Section").unwrap();
32//! assert_eq!(section.get("some KEY"), Some("This is a value!"));
33//! assert_eq!(ini.get_value("Another Section", "anotherkey"), Some("//Wow Look At Me I'm A Value\\\\"));
34//! ```
35
36extern crate alloc;
37
38mod ini;
39pub use ini::*;
40