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
1 changed files with 1 additions and 1 deletions

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 {