mirror of
https://github.com/golang/go
synced 2024-11-11 18:01:47 -07:00
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
Block a user