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