MCPcopy
hub / github.com/cortexlabs/cortex / StrSliceElementsMatch

Function StrSliceElementsMatch

pkg/lib/slices/string.go:149–157  ·  view source on GitHub ↗
(strs1 []string, strs2 []string)

Source from the content-addressed store, hash-verified

147}
148
149func StrSliceElementsMatch(strs1 []string, strs2 []string) bool {
150 if len(strs1) == 0 && len(strs2) == 0 {
151 return true
152 }
153 if len(strs1) != len(strs2) {
154 return false
155 }
156 return StrSlicesEqual(SortStrsCopy(strs1), SortStrsCopy(strs2))
157}
158
159func StrSlicesEqual(strs1 []string, strs2 []string) bool {
160 if len(strs1) == 0 && len(strs2) == 0 {

Callers 1

Calls 2

StrSlicesEqualFunction · 0.85
SortStrsCopyFunction · 0.85

Tested by 1