:pencil: An INI parser library written in Rust.
Soon.
| Feature | Implemented? | |----------------------------|--------------------| | Sections support | :heavycheckmark: | | Disabled entry recognition | :heavycheckmark: | | Section nesting support | :x: | | Multi-line support | :x: |
ini
; file.ini
[section]
full_name = "Hicaro"
rust
let parsed_file = Parser::parse("file.ini").unwrap();
assert_eq!(parsed_file["section"]["full_name"], "Hicaro".to_string());
You can read valid and invalid examples on examples
.
Comment lines start with ;
```ini
; this is a comment
```
All values must be surrounded by quotes
Valid:
ini
[section]
name = "John Doe"
Invalid:
ini
[section]
name = John Doe
All key names must have one word
Valid:
ini
[credentials]
full_name = "John Doe"
Invalid:
ini
[credentials]
full name = "John Doe"
If you want multiple words on your key name, use whatever style you want, but don't use space to separate that.
Disable entry recognition by using ;
ini
[credentials]
; full_name = "John Doe"
If you find any problems with this library, please let me know by opening an issue explaining the problem.
This project is licensed under the MIT license.