Array.clear

Removes all elements.

struct Array(T)
void
clear
()

Examples

auto v = Array!int([18, 20, 15]);
v.clear();
assert(v.length == 0);
assert(v.capacity == 3);

Meta