The OpenD Programming Language

StringMap.byKey

import mir.string_map;
struct StringMap(T)
alias byKey = keys

Examples

StringMap!double map;
assert(map.keys == []);
map["c"] = 4.0;
assert(map.keys == ["c"]);
map["a"] = 3.0;
assert(map.keys == ["c", "a"]);
map.remove("c");
assert(map.keys == ["a"]);
map.remove("a");
assert(map.keys == []);
map["c"] = 4.0;
assert(map.keys == ["c"]);

Meta