gitlab.com/evatix-go/core@v1.3.55/coreutils/stringutil/IsAnyStartsWith.go (about) 1 package stringutil 2 3 func IsAnyStartsWith( 4 content string, 5 isIgnoreCase bool, 6 startsWithTerms ...string, 7 ) bool { 8 if len(content) > 0 && len(startsWithTerms) == 0 { 9 return false 10 } 11 12 if len(content) == 0 && len(startsWithTerms) == 0 { 13 return true 14 } 15 16 for _, term := range startsWithTerms { 17 if IsStartsWith( 18 content, 19 term, 20 isIgnoreCase) { 21 return true 22 } 23 } 24 25 return false 26 }