reserve

fnsize_t reserve(T)(ref T[] arr, size_t newcapacity) pure nothrow @trusted

Reserves capacity for a slice. The capacity is the size that the slice can grow to before the underlying array must be reallocated or extended.

Returns

The new capacity of the array (which may be larger than

the requested capacity).