blob: e353e4ca06a2fbab087982e28010b14792054445 [file] [log] [blame]
// +build ignore,OMIT
package examples
// IndexOfAny START OMIT
func IndexOfAny(str string, chars []rune) int {
if len(str) == 0 || len(chars) == 0 {
return -1
}
for i, ch := range str {
for _, match := range chars {
if ch == match {
return i
}
}
}
return -1
}
// IndexOfAny END OMIT