Removes and returns the element at the specified position.
SDK
- Xcode 10.0+
Framework
- Swift Standard Library
Declaration
Parameters
index
The position of the element to remove.
index
must be a valid index of the array.
Return Value
The element at the specified index.
Discussion
All the elements following the specified position are moved up to close the gap.
Complexity: O(n), where n is the length of the array.