Return Value 戻り値
A new set. 新しい集合。
Availability 有効性
Technology
func symmetricDifference(_ other: AccessibilityTraits
) -> AccessibilityTraits
A new set. 新しい集合。
other
A set of the same type as the current set. 現在の集合と同じ型の集合。
In the following example, the either
set is made up of the elements of the employees
and neighbors
sets that are not in both employees
and neighbors
. In particular, the names "Bethany"
and "Eric"
do not appear in either
.
let employees: Set = ["Alicia", "Bethany", "Diana", "Eric"]
let neighbors: Set = ["Bethany", "Eric", "Forlani"]
let eitherNeighborsOrEmployees = employees.symmetricDifference(neighbors)
print(eitherNeighborsOrEmployees)
// Prints "["Diana", "Forlani", "Alicia"]"