mirror of https://github.com/buggins/dlangui.git
better settings accessors
This commit is contained in:
parent
ae12dd12b9
commit
42f9d60b4f
|
@ -1227,6 +1227,12 @@ final class Setting {
|
||||||
return item.strDef(defValue);
|
return item.strDef(defValue);
|
||||||
return defValue;
|
return defValue;
|
||||||
}
|
}
|
||||||
|
/// returns string array item by key from map, returns null if not found
|
||||||
|
string[] getStringArray(string key) {
|
||||||
|
if (auto item = opIndex(key))
|
||||||
|
return item.strArray();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// serialize to json
|
/// serialize to json
|
||||||
string toJSON(bool pretty = false) {
|
string toJSON(bool pretty = false) {
|
||||||
|
|
Loading…
Reference in New Issue