diff options
author | Robert Griesemer <gri@golang.org> | 2015-01-22 09:16:20 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2015-01-22 18:28:35 +0000 |
commit | 19c1b163e85ba5a25d95f8174a90b2dc2470a18f (patch) | |
tree | 7f015c930ea16e6b2467bc94f2f08a22740ffa7e /src/strings | |
parent | 494b4ce2a7bc9fd4813ea546ef589b3ce0fc980f (diff) | |
download | go-git-19c1b163e85ba5a25d95f8174a90b2dc2470a18f.tar.gz |
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>
Diffstat (limited to 'src/strings')
-rw-r--r-- | src/strings/strings.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/strings/strings.go b/src/strings/strings.go index 27d384983e..f362f185a9 100644 --- a/src/strings/strings.go +++ b/src/strings/strings.go @@ -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 |