mirror of https://github.com/golang/go.git
stringslite: remove 0 to simplify reslice syntax
This commit is contained in:
parent
ffb3e57401
commit
1f9fa1c5c9
|
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
func HasPrefix(s, prefix string) bool {
|
||||
return len(s) >= len(prefix) && s[0:len(prefix)] == prefix
|
||||
return len(s) >= len(prefix) && s[:len(prefix)] == prefix
|
||||
}
|
||||
|
||||
func HasSuffix(s, suffix string) bool {
|
||||
|
|
|
|||
Loading…
Reference in New Issue