Creates new instance of INIReader from source.
Reader's Box type (boxer return type).
Reader's boxer.
Reader's flags.
Reader's format descriptor.
Alias for INIReaderKey!(BoxType).
Type of value property.
Returns key token.
Reads next token.
Returns section name.
Indicates whenever source has been exhausted.
Used only with Key tokens.
INI source bytes.
INI source offset in bytes.
Type of current token.
Current token's value.
INIReader expects three template arguments:
- Format
Instance of INIFormatDescriptor, defines quote and comment sequences.
- Flags
INIReaderFlags (can be OR-ed)
- Boxer
Name of a function that takes (string value, INIReader reader) and returns a value. By default all readers just proxy values, doing nothing, but this can be used to e.g. store token values as JSONValue or other Algebraic-like type.
INIReader.BoxType is always return type of boxer function. So if you passed a boxer that returns SomeAlgebraic then typeof(reader.key.value) is SomeAlgebraic.
auto reader = UniversalINIReader("key=value\n"); while (reader.next) { writeln(reader.value); }
Splits source into tokens.
This struct requires token delimeters to be ASCII-characters, Unicode is not supported **only** for token delimeters.
Unless you want to modify INIReader behaviour prefer using one of available preconfigured variants:
- StrictINIReader - UniversalINIReader