The OpenD Programming Language

StringMap.clear

Removes all remaining keys and values from an associative array.

Complexity: O(1)

struct StringMap(T)
@safe pure nothrow @nogc
void
clear
()
()

Examples

StringMap!double map;
map["c"] = 4.0;
map["a"] = 3.0;
map.clear;
assert(map.length == 0);
assert(map.capacity == 0);
map.assumeSafeAppend;
assert(map.capacity >= 2);

Meta