assocArray

fnauto assocArray(Range)(Range r) if (isInputRange!Range)

Returns a newly allocated associative array from a range of key/value tuples or from a range of keys and a range of values.

Parameters

rAn input range of tuples of keys and values.
keysAn input range of keys
valuesAn input range of values

Returns

A newly allocated associative array out of elements of the input

range, which must be a range of tuples (Key, Value) or a range of keys and a range of values. If given two ranges of unequal lengths after the elements of the shorter are exhausted the remaining elements of the longer will not be considered. Returns a null associative array reference when given an empty range. Duplicates: Associative arrays have unique keys. If r contains duplicate keys, then the result will contain the value of the last pair for that key in r.

See Also

fnauto assocArray(Keys, Values)(Keys keys, Values values) if (isInputRange!Values && isInputRange!Keys)

ditto