Instance Method


Returns a new set containing the elements of this set that do not occur in the given set.


func subtracting(_ other: ARView.DebugOptions) -> ARView.DebugOptions



A set of the same type as the current set.

Return Value

A new set.


In the following example, the nonNeighbors set is made up of the elements of the employees set that are not elements of neighbors:

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

See Also

Adding and Removing Options

func insert(ARView.DebugOptions) -> (inserted: Bool, memberAfterInsert: ARView.DebugOptions)

Adds the given element to the option set if it is not already a member.

func remove(ARView.DebugOptions) -> ARView.DebugOptions?

Removes the given element and all elements subsumed by it.

func subtract(ARView.DebugOptions)

Removes the elements of the given set from this set.