HasAll returns true if and only if all items are contained in the set.
(items ...string)
| 67 | |
| 68 | // HasAll returns true if and only if all items are contained in the set. |
| 69 | func (s String) HasAll(items ...string) bool { |
| 70 | for _, item := range items { |
| 71 | if !s.Has(item) { |
| 72 | return false |
| 73 | } |
| 74 | } |
| 75 | return true |
| 76 | } |
| 77 | |
| 78 | // HasAny returns true if any items are contained in the set. |
| 79 | func (s String) HasAny(items ...string) bool { |