Removes and returns the key-value pair at the specified index.
SDK
- Xcode 8.3+
Framework
- Swift Standard Library
Declaration
Parameters
index
The position of the key-value pair to remove.
index
must be a valid index of the dictionary, and must not equal the dictionary’s end index.
Return Value
The key-value pair that correspond to index
.
Discussion
Calling this method invalidates any existing indices for use with this dictionary.
Complexity: O(n), where n is the number of key-value pairs in the dictionary.