Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-swift latest

Options.subtract(_:)

Removes the elements of the given set from this set.

Source and package
Qualified name
RegexPattern.Options.subtract(_:)
Module
RegexPattern
Declared in
Options
Package
libtmux-swift
subtract(other: Self) -> ()

Inherited from SetAlgebra.subtract(_:)

Description#

In the following example, the elements of the employees set that are also members of the neighbors set are removed. In particular, the names "Bethany" and "Eric" are removed from employees.

var employees: Set = ["Alicia", "Bethany", "Chris", "Diana", "Eric"] let neighbors: Set = ["Bethany", "Eric", "Forlani", "Greta"] employees.subtract(neighbors) print(employees) // Prints "["Diana", "Chris", "Alicia"]"

  • Parameter other: A set of the same type as the current set.
Parameters
Esc

Type to search.

Reference previewOpen reference