init(capacity:copying:)
Creates a new array with the specified capacity, holding a copy of the contents of the given span.
Declaration
init(capacity: Int? = nil, copying span: Span<Element>)Parameters
- capacity:
The storage capacity of the new array, or nil to allocate just enough capacity to store the contents of the span.
- span:
The span whose contents to copy into the new array. The span must not contain more than
capacityelements.