_d_arraysetcapacityPureNothrow

fnsize_t _d_arraysetcapacityPureNothrow(T)(size_t newcapacity, void[] * p, bool isshared) pure nothrow @trusted

Set the array capacity.

If the array capacity isn't currently large enough to hold the requested capacity (in number of elements), then the array is resized/reallocated to the appropriate size.

Pass in a requested capacity of 0 to get the current capacity.

Parameters

Tthe type of the elements in the array (this should be unqualified)
newcapacityrequested new capacity
ppointer to array to set. Its length is left unchanged.
issharedtrue if the underlying data is shared

Returns

the number of elements that can actually be stored once the resizing is done