Removes all members from the set.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Parameters
keepingCapacity
If
true
, the set’s buffer capacity is preserved; iffalse
, the underlying buffer is released. The default isfalse
.
Removes all members from the set.
SDK
Framework
keepingCapacity
If true
, the set’s buffer capacity is preserved; if false
, the underlying buffer is released. The default is false
.
func filter((Element) -> Bool) -> Set<Element>
Returns a new set containing the elements of the set that satisfy the given predicate.
func remove(Element) -> Element?
Removes the specified element from the set.
func remove First() -> Element
Removes the first element of the set.
func remove(at: Set<Element>.Index) -> Element
Removes the element at the given index of the set.