Code: Select all
$content = getkey(, "General", "<come .ini file>");Code: Select all
[General]
Reserved=0
Broken=1
Test=0
Code: Select all
Reserved=0
Broken=1
Test=0Code: Select all
$content = getkey(, "General", "<come .ini file>");Code: Select all
[General]
Reserved=0
Broken=1
Test=0
Code: Select all
Reserved=0
Broken=1
Test=0Code: Select all
::$content = getkey(, "Settings", <xyini>); $keys = replace($content,chr(00),<crlf>); text $content; text hexdump($content); text $keys;Code: Select all
' 20150304: returns a list of all key=value pairs in Section, separated by Separator
' syntax: getkeyvaluelist(Section, [INIfile], [Separator=CRLF])
' example: text getkeyvaluelist("General");
Code: Select all
getini()
Returns a list of all keys in Section or a list of sections,separated by Separator.
Optionally with values or child keys respectively.
syntax: getini([Section], [INIfile], [Separator=CRLF], [return terseness flag])
example:
text getini("General");
//returns all keys only in General section of <xyini>
text getini("General",,,1);
//returns the same but with values as key=value
text getini(,,,);
//returns all sections in <xyini>
text getini(,,,1);
//returns the same but with child keys as section<tab>keys<tab>keysCode: Select all
$kvPairs = getkeyvaluelist('General|Settings'); // Get all key=values in General & Settings sectionsa separator? nice to skip an extra step of replace(getkey(),chr(00),<crlf>)admin wrote:Indeed, GetKey can do it. So I just leave it all as it is now.
Ah, okay. In that case getSectionList() is the better name indeed.SammaySarkar wrote:a separator? nice to skip an extra step of replace(getkey(),chr(00),<crlf>)admin wrote:Indeed, GetKey can do it. So I just leave it all as it is now.
Code: Select all
text getsectionlist("General");
text getsectionlist();