Array.length

Return the number of elements in the array..

struct Array(T)
@nogc nothrow pure @safe const
size_t
length
()

Return Value

Type: size_t

the length of the array.

Complexity: O(1).

Examples

auto a = Array!int(1, 2, 3);
assert(a.length == 3);
assert(a[$ - 1] == 3);

Meta