Array.opDollar

Return the number of elements in the array..

struct Array(T)
alias opDollar = length

Return Value

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