mirror of https://github.com/adamdruppe/arsd.git
Refactor AA to have keys typed as `immutable(char)[]`
This commit is contained in:
parent
a2fe6f1fb4
commit
88b50feef1
11
ini.d
11
ini.d
|
|
@ -1780,7 +1780,12 @@ company = "Digital Mars"
|
||||||
See_also:
|
See_also:
|
||||||
[parseIniDocument]
|
[parseIniDocument]
|
||||||
+/
|
+/
|
||||||
string[string][string] parseIniAA(IniDialect dialect = IniDialect.defaults, string)(string rawIni) @safe pure nothrow {
|
string[immutable(char)[]][immutable(char)[]] parseIniAA(
|
||||||
|
IniDialect dialect = IniDialect.defaults,
|
||||||
|
string,
|
||||||
|
)(
|
||||||
|
string rawIni,
|
||||||
|
) @safe pure nothrow {
|
||||||
static if (is(string == immutable(char)[])) {
|
static if (is(string == immutable(char)[])) {
|
||||||
immutable(char)[] toString(string key) => key;
|
immutable(char)[] toString(string key) => key;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1789,8 +1794,8 @@ string[string][string] parseIniAA(IniDialect dialect = IniDialect.defaults, stri
|
||||||
|
|
||||||
auto parser = IniParser!(dialect, string)(rawIni);
|
auto parser = IniParser!(dialect, string)(rawIni);
|
||||||
|
|
||||||
string[string][string] document;
|
string[immutable(char)[]][immutable(char)[]] document;
|
||||||
string[string] section;
|
string[immutable(char)[]] section;
|
||||||
|
|
||||||
string sectionName = null;
|
string sectionName = null;
|
||||||
string keyName = null;
|
string keyName = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue