core.internal.parseoptions
parse configuration options
Copyright
Copyright Digital Mars 2017
struct MemVal
Types 4
aliasrt_configCallBack = string delegate(string) @nogc nothrow
aliasfn_configOption = string function(string opt, scope rt_configCallBack dg, bool reverse) @nogc nothrow
aliasrt_configOption = externDFunc!("rt.config.rt_configOption", fn_configOption)
structMemVal
UDA for field treated as memory value
Functions 15
fn
bool initConfigOptions(CFG)(ref CFG cfg, string cfgname)initialize members of struct CFG from rt_config optionsfn
bool parseOptions(CFG)(ref CFG cfg, string opt)initialize members of struct CFG from a string of sub-options.fn
bool rt_parseOption(T)(const(char)[] optname, ref inout(char)[] str, ref T res, const(char)[] errName)Parses an individual option `optname` value from a provided string `str`. The option type is given by the type `T` of the field `res` to which the parsed value will be written too. In case of an er...fn
bool optError(const scope char[] msg, const scope char[] name, const(char)[] errName)fn
inout(char)[] skip(alias pred)(inout(char)[] str)fn
inout(char)[] find(alias pred)(inout(char)[] str)fn
bool parse(T : size_t)(const(char)[] optname, ref inout(char)[] str, ref T res, const(char)[] errName, bool mayHaveSuffix = false) if (is(T == size_t))fn
bool parse(T : size_t)(const(char)[] optname, ref inout(char)[] str, ref T res, const(char)[] errName, bool mayHaveSuffix = false) if (!is(T == size_t))fn
bool parse(const(char)[] optname, ref inout(char)[] str, ref bool res, const(char)[] errName)fn
bool parse(const(char)[] optname, ref inout(char)[] str, ref float res, const(char)[] errName)fn
bool parse(const(char)[] optname, ref inout(char)[] str, ref inout(char)[] res, const(char)[] errName)fn
bool parseError(const scope char[] exp, const scope char[] opt, const scope char[] got, const(char)[] errName)fn
bool overflowedError(const scope char[] opt, const scope char[] got)fn
size_t min(size_t a, size_t b)Variables 3
var
bool rt_envvars_enabledvar
bool rt_cmdline_enabledvar
string[] rt_options