Removes all key-value pairs from the dictionary.
- Xcode 8.0+
- Swift Standard Library
Whether the dictionary should keep its underlying buffer. If you pass
true, the operation preserves the buffer capacity that the collection has, otherwise the underlying buffer is released. The default is
Calling this method invalidates all indices with respect to the dictionary.
Complexity: O(n), where n is the number of key-value pairs in the dictionary.