Complement returns a new set which is the complement from `set` to `full`. Which means, all the items in `newSet` are in `full` and not in `set`. It returns the difference between `full` and `set` if the given set `full` is not the full set of `set`.
()
| 111 | // Which means, all the items in `newSet` are in `full` and not in `set`. |
| 112 | // It returns the difference between `full` and `set` if the given set `full` is not the full set of `set`. |
| 113 | func ExampleIntSet_Complement() { |
| 114 | intSet := gset.NewIntSetFrom([]int{1, 2, 3, 4, 5}) |
| 115 | s := gset.NewIntSetFrom([]int{1, 2, 3}) |
| 116 | fmt.Println(s.Complement(intSet).Slice()) |
| 117 | |
| 118 | // May Output: |
| 119 | // [4 5] |
| 120 | } |
| 121 | |
| 122 | // Contains checks whether the set contains `item`. |
| 123 | func ExampleIntSet_Contains() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…