Function List.length

Returns the length of the list, in terms of number of elements.

size_t length() const pure nothrow @nogc @property scope @safe;

Examples

List!(int) list = null;
assert(list.length == 0);

list.append(42);
assert(list.length == 1);

list.append(123);
assert(list.length == 2);

list.clear();
assert(list.length == 0);