Returns a new set with items in the current set or the other set but not in both.
(other StringSet)
| 114 | |
| 115 | // Returns a new set with items in the current set or the other set but not in both. |
| 116 | func (set StringSet) SymmetricDifference(other StringSet) StringSet { |
| 117 | aDiff := set.Difference(other) |
| 118 | bDiff := other.Difference(set) |
| 119 | return aDiff.Union(bDiff) |
| 120 | } |
| 121 | |
| 122 | // Clears the entire set to be the empty set. |
| 123 | func (set *StringSet) Clear() { |