ParamSet

Members

Functions

access
bool access(cstring key, void delegate(cstring key, ref cstring val) dg)

Invokes dg with the original key and a reference to the parameter value for key if key is one of parameter keys passed on instantiation or added by a subclass.

addKey
cstring addKey(cstring key)

Adds an entry for key.

addKeys
void addKeys(cstring[] keys)

Adds an entry for key.

getElement
Element getElement(cstring key)

Obtains the parameter value corresponding to key, bundled with the original key.

getUnsigned
bool getUnsigned(cstring key, T n, bool is_set)
bool getUnsigned(cstring key, T n)

Obtains the parameter value corresponding to key which is expected to be an unsigned decimal integer number and not empty. key must be one of the parameter keys passed on instantiation or added by a subclass.

get_
Element* get_(cstring key)

Looks up key in a case-insensitive manner.

iterate
void iterate(Element element, int delegate(ref cstring key, ref cstring val) dg, int result)

opApply() helper, invokes dg with element.key & val.

matches
bool matches(cstring key, cstring val)

Compares the parameter value corresponding to key with val in a case-insensitive manner.

opApply
int opApply(int delegate(ref cstring key, ref cstring val) dg)

'foreach' iteration over parameter key/value pairs

opIn_r
cstring* opIn_r(cstring key)

Obtains the parameter value corresponding to key.

opIndex
cstring opIndex(cstring key)

Obtains the parameter value corresponding to key. key must be one of the parameter keys passed on instantiation or added by a subclass.

opIndexAssign
cstring opIndexAssign(cstring val, cstring key)

Sets the parameter value for key. Key must be one of the parameter keys passed on instantiation or added by a subclass.

rehash
void rehash()

Rehashes the associative array.

reset
void reset()

Resets all parameter values to null.

set
bool set(cstring key, cstring val)

Sets the parameter value for key if key is one of the parameter keys passed on instantiation or added by a subclass.

set
bool set(cstring key, size_t val, mstring dec)

ditto

tolower
mstring tolower(cstring key)

Converts key to lower case, writing to a separate buffer so that key is left untouched.

Static functions

readUnsigned
cstring readUnsigned(cstring src, T x)

Converts str, which is expected to contain a decimal number, to the number it represents. Tailing and leading whitespace is allowed and will be trimmed. If src contains non-decimal digit characters after trimming, conversion will be stopped at the first non-decimal digit character.

strncasecmp
int strncasecmp(cstring a, cstring b)

Compares a to b, treating ASCII characters case-insensitively. If a and b have a different length, the first common characters are compared. If these are equal, the longer string compares greater.

writeUnsigned
mstring writeUnsigned(mstring dst, ulong n)

Converts n to decimal representation, writing to dst. dst must be long enough to hold the result. The result will be written to the end of dst, returning a slice to the valid content in dst.

Static variables

ulong_dec_length
auto ulong_dec_length;

Minimum required buffer length for decimal formatting of an uint value

Structs

Element
struct Element
Undocumented in source.

Variables

skip_null_values_on_iteration
bool skip_null_values_on_iteration;

Set to true to skip key/value pairs with a null value on 'foreach' iteration.

Meta