Skip to content

Commit ba95de8

Browse files
committed
minor
1 parent 2b79753 commit ba95de8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

strings/stringsutil.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,9 @@ func ContainsAll(s string, ss ...string) bool {
315315

316316
// ContainsAllI returns true if s contains all specified substrings (case-insensitive).
317317
func ContainsAllI(s string, ss ...string) bool {
318+
lowerS := strings.ToLower(s)
318319
for _, sub := range ss {
319-
if !strings.Contains(strings.ToLower(s), strings.ToLower(sub)) {
320+
if !strings.Contains(lowerS, strings.ToLower(sub)) {
320321
return false
321322
}
322323
}

0 commit comments

Comments
 (0)