ConfigParser.getStrict

Strict method to get the value of a config key. If the requested key cannot be found, an exception is thrown.

Template can be instantiated with integer, float or string (istring) type.

Usage Example:

Config.parseFile("some-config.ini");
// throws if not found
auto str = Config.getStrict!(istring)("some-cat", "some-key");
auto n = Config.getStrict!(int)("some-cat", "some-key");
  1. T getStrict(cstring category, cstring key)
    class ConfigParser
    T
    getStrict
    (
    T
    )
  2. void getStrict(T value, cstring category, cstring key)

Parameters

category cstring

category to get key from

key cstring

key whose value is to be got

Return Value

Type: T

value of a configuration key, or null if none

Throws

if the specified key does not exist

Meta