bytes, strings: improve documentation for Count functions

Fixes #9659.

Change-Id: If364d5984a0c9a48858ae524b1560f633e621826
Reviewed-on: https://go-review.googlesource.com/3181
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Robert Griesemer 2015-01-22 09:16:20 -08:00
parent 494b4ce2a7
commit 19c1b163e8
2 changed files with 3 additions and 1 deletions

View file

@ -78,6 +78,7 @@ func hashStrRev(sep string) (uint32, uint32) {
}
// Count counts the number of non-overlapping instances of sep in s.
// If sep is an empty string, Count returns 1 + the number of Unicode code points in s.
func Count(s, sep string) int {
n := 0
// special cases