diff options
| author | Tim Cooper <tim.cooper@layeh.com> | 2017-09-27 21:44:38 -0300 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2017-10-02 00:31:47 +0000 |
| commit | f2af0c178099c0d785efe3b6f5f2282277f9ee9c (patch) | |
| tree | e6d93a41d2cf349c505d9a055ab50ff48eaca626 /src/bytes/bytes_amd64.go | |
| parent | ed815d0038d42d2c7359cc319babd6b289cedbef (diff) | |
| download | go-f2af0c178099c0d785efe3b6f5f2282277f9ee9c.tar.xz | |
bytes: explicitly state if a function expects UTF-8-encoded data
Fixes #21950
Change-Id: I6fa392abd2c3bf6a4f80f14c6b1419470e9a944d
Reviewed-on: https://go-review.googlesource.com/66750
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/bytes/bytes_amd64.go')
| -rw-r--r-- | src/bytes/bytes_amd64.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bytes/bytes_amd64.go b/src/bytes/bytes_amd64.go index 77d5970152..88b0564db4 100644 --- a/src/bytes/bytes_amd64.go +++ b/src/bytes/bytes_amd64.go @@ -97,7 +97,7 @@ func Index(s, sep []byte) int { } // Count counts the number of non-overlapping instances of sep in s. -// If sep is an empty slice, Count returns 1 + the number of Unicode code points in s. +// If sep is an empty slice, Count returns 1 + the number of UTF-8-encoded code points in s. func Count(s, sep []byte) int { if len(sep) == 1 && cpu.X86.HasPOPCNT { return countByte(s, sep[0]) |
