This commit is contained in:
2020-02-23 15:36:57 +01:00
parent 737d277ea5
commit b48ac6679e
214 changed files with 67756 additions and 1 deletions

View File

@@ -0,0 +1,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)
}