pub fn query_toml_value(toml_str: &str, key: &str) -> Result<String, String>
Expand description

Query value from toml by key.

Examples

let toml_str = r#"key = "value"  # This is a comment at the end of a line"#;
let key = "key";
let value = query_toml_value(toml_str, key).unwrap();
assert_eq!(value, "value");