The number of key-value pairs in the dictionary.
SDK
- Xcode 10.0+
Framework
- Swift Standard Library
Declaration
var count: Int { get }
Discussion
Complexity: O(1).
The number of key-value pairs in the dictionary.
SDK
Framework
var count: Int { get }
Complexity: O(1).
var isEmpty : Bool
A Boolean value that indicates whether the dictionary is empty.
var capacity: Int
The total number of key-value pairs that the dictionary can contain without allocating new storage.