On this page
RegexPattern.Options.subtracting(_:)
- Module
- RegexPattern
- Declared in
- Options
- Package
- libtmux-swift
-
Returns a new set containing the elements of this set that do not occur in the given set.
In the following example, the
nonNeighborsset is made up of the elements of theemployeesset that are not elements ofneighbors:let employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] let nonNeighbors = employees.subtracting(neighbors) print(nonNeighbors) // Prints "["Diana", "Chris", "Alicia"]"
- Parameter other: A set of the same type as the current set.
- Returns: A new set.
0 declared, 0 inherited