Array.length

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 O(abs(length - newLength)) if capacity >= newLength. If capacity < newLength the worst case is O(newLength).

Postcondition: length == newLength

  1. size_t length [@property getter]
  2. size_t length [@property setter]
    struct Array(T)
    @property
    void
    length
    (
    size_t newLength
    )
    if (
    is(immutable T == immutable bool)
    )

Meta