blob: d008ae27cb31948af5dc7e7fb5482389ce0908fa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
package strings
import (
"strings"
)
// HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings,
// under Unicode case-folding.
func HasPrefixFold(s, prefix string) bool {
return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix)
}
|