Contents

append(copying:)

Copies the elements of a buffer to the end of this array.

Declaration

mutating func append(copying newElements: UnsafeMutableBufferPointer<Element>)

Parameters

  • newElements:

    A fully initialized buffer whose contents to copy into the array.

Discussion

If the array does not have sufficient capacity to hold enough elements, then this reallocates the array’s storage to extend its capacity, using a geometric growth rate.