inifilesection
¶
This is the type for the referenced section of an ini file.
Members¶
int Count
¶
- How many sections matching the Section[] index exist.
bool Exists
¶
- Whether a specific section exists.
inifilesectionkey Key[opt: Key]
¶
-
A reference to the named or unnamed key in this specific ini file section.
The index is optional. Passing an index means it will reference all keys that match that index. Not passing an index references all keys for operations that allow it.
Examples¶
Given the sample.ini file:
[Section1]
Key1=foo
Key2=bar
[Section1]
Key1=bar
Key2=foo
[Section2]
Key=foo
Key=bar
Key=foobar
Example
How many sections are there?
| Prints 3
/echo ${Ini.File[Sample].Section.Count}
How many sections named "Section1" are there?
| Orints 2
/echo ${Ini.File[Sample].Section[Section1].Count}
Does "Section3" exist?
| Prints FALSE
/echo ${Ini.File[Sample].Section[Section3].Exists}
How many sections are there?
-- prints 3
print(mq.TLO.Ini.File("Sample").Section.Count())
How many sections named "Section1" are there?
-- prints 2
print(mq.TLO.Ini.File("Sample").Section("Section1").Count())
Does "Section3" exist?
-- prints false
print(mq.TLO.Ini.File("Sample").Section("Section3").Exists())