entao_ini 1.0.3
entao_ini: ^1.0.3 copied to clipboard
ini file read and write.
Ini file read and write #
Usage #
host=google.com
port = 8080 ; this is comment
[account]
; this is another\
comment
type= "admin"
user= entao \
yang
[group]
dept=dev
desc= this is desc\;\n newline
IniFile ini = IniFile.parse(s);
println(ini);
println();
ini.put("dept", "test", section: "group");
String out = ini.toString();
println(out);
test("Ini file test", () {
expect(ini.get("host"), "google.com");
expect(ini.get("port"), "8080");
expect(ini.get("user", section: "account"), "entao \nyang");
expect(ini.get("type", section: "account"), "admin");
expect(ini.get("dept", section: "group"), "test");
expect(ini.get("desc", section: "group"), "this is desc;\n newline");
});