Set
extension Set
-
Creates a set containing the elements of a cursor.
// Set<String> let strings = try Set(cursor)
Declaration
Swift
public init<C>(_ cursor: C) throws where Element == C.Element, C : Cursor
Parameters
cursor
A cursor of values to gather into a set.
-
Creates a set containing the elements of a cursor.
// Set<String> let strings = try Set(cursor, minimumCapacity: 100)
Declaration
Swift
public init<C>(_ cursor: C, minimumCapacity: Int) throws where Element == C.Element, C : Cursor
Parameters
cursor
A cursor of values to gather into a set.
minimumCapacity
The minimum number of elements that the newly created set should be able to store without reallocating its storage buffer.