mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-01 04:31:44 +02:00
``` * use go 1.17 semantics in go.mod * pin tonistiigi/fsutil dep to match docker/docker's dep go get -u ./... go mod vendor ```
12 lines
288 B
Go
12 lines
288 B
Go
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)
|
|
}
|