Adds the elements of a sequence to the end of the array.
SDK
- Xcode 10.2+
Framework
- Swift Standard Library
Declaration
Parameters
newElements
The elements to append to the array.
Discussion
Use this method to append the elements of a sequence to the end of this array. This example appends the elements of a Range<Int>
instance to an array of integers.
Complexity: O(m) on average, where m is the length of new
, over many calls to append(contents
on the same array.