Adds the elements of a sequence or collection to the end of this collection.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
Parameters
newElements
The elements to append to the collection.
Discussion
The collection being appended to allocates any additional necessary storage to hold the new elements.
The following example appends the elements of a Range<Int>
instance to an array of integers:
Complexity: O(m), where m is the length of new
.
Note
This documentation comment was inherited from Range
.