SliceContainsSlice returns true all items in the target are equal to items in the slice
(slice []T, target []T)
| 20 | |
| 21 | // SliceContainsSlice returns true all items in the target are equal to items in the slice |
| 22 | func SliceContainsSlice[T comparable](slice []T, target []T) bool { |
| 23 | var containsAllElementsOfTarget = true |
| 24 | for _, targetElement := range target { |
| 25 | if SliceContains(slice, targetElement) { |
| 26 | containsAllElementsOfTarget = true |
| 27 | } else { |
| 28 | return false |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | return containsAllElementsOfTarget |
| 33 | } |
| 34 | |
| 35 | // SliceEquals returns true if the slices have the same string contents, regardless of order |
| 36 | func SliceEquals(slice []string, target []string) bool { |
no test coverage detected