Array.length

size_t length() @property const

Returns the number of elements in the array.

Complexity: 1.

void length(size_t newLength) @property

Sets the number of elements in the array to newLength. If newLength is greater than length, the new elements are added to the end of the array and initialized with false.

Complexity: Guaranteed abs(length - newLength) if capacity >= newLength. If capacity < newLength the worst case is newLength.

Postcondition: length == newLength