1
0
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:
nlwkobe30 2024-08-30 22:36:08 +08:00
parent ffb3e57401
commit 1f9fa1c5c9

View File

@ -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 {