aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/bytes_arm64.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2018-03-03 10:28:58 -0800
committerKeith Randall <khr@golang.org>2018-03-04 17:49:25 +0000
commit45964e4f9c950863adcaeb62fbe49f3fa913f27d (patch)
treebb07b6ae9f12caa6156932ff236ce3c4c42147e0 /src/bytes/bytes_arm64.go
parent89ae7045f395de8eb4085e3ac8c1ebf59b029965 (diff)
downloadgo-45964e4f9c950863adcaeb62fbe49f3fa913f27d.tar.xz
internal/bytealg: move Count to bytealg
Move bytes.Count and strings.Count to bytealg. Update #19792 Change-Id: I3e4e14b504a0b71758885bb131e5656e342cf8cb Reviewed-on: https://go-review.googlesource.com/98495 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/bytes/bytes_arm64.go')
-rw-r--r--src/bytes/bytes_arm64.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/bytes/bytes_arm64.go b/src/bytes/bytes_arm64.go
index 3d9ed3dd22..39e9562db1 100644
--- a/src/bytes/bytes_arm64.go
+++ b/src/bytes/bytes_arm64.go
@@ -70,12 +70,3 @@ func Index(s, sep []byte) int {
}
return -1
}
-
-// Count counts the number of non-overlapping instances of sep 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 {
- return countByte(s, sep[0])
- }
- return countGeneric(s, sep)
-}