glob/strings/strings.go

14 lines
183 B
Go
Raw Normal View History

2016-02-02 22:03:37 +03:00
package strings
import "strings"
func IndexAnyRunes(s string, rs []rune) int {
for _, r := range rs {
if i := strings.IndexRune(s, r); i != -1 {
return i
}
}
return -1
}