diff options
Diffstat (limited to 'src/bytes/bytes.go')
| -rw-r--r-- | src/bytes/bytes.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go index 7ecf3b59f6..9ee66cae4e 100644 --- a/src/bytes/bytes.go +++ b/src/bytes/bytes.go @@ -552,12 +552,12 @@ func Join(s [][]byte, sep []byte) []byte { return b } -// HasPrefix tests whether the byte slice s begins with prefix. +// HasPrefix reports whether the byte slice s begins with prefix. func HasPrefix(s, prefix []byte) bool { return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix) } -// HasSuffix tests whether the byte slice s ends with suffix. +// HasSuffix reports whether the byte slice s ends with suffix. func HasSuffix(s, suffix []byte) bool { return len(s) >= len(suffix) && Equal(s[len(s)-len(suffix):], suffix) } |
