mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 23:30:34 +07:00
16 lines
267 B
Go
16 lines
267 B
Go
package utils
|
|
|
|
import "strings"
|
|
|
|
func ContainsMany(str string, substrings ...string) bool {
|
|
var matches int
|
|
for _, substr := range substrings {
|
|
if strings.Contains(str, substr) {
|
|
matches++
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
return matches == len(substrings)
|
|
}
|