mirror of
https://github.com/golang/go
synced 2024-11-25 10:17:57 -07:00
strings: make Count example show results
Thanks to dr.volker.dobler for tracking this down. Filed a long-term issue (3142) which may eventually resolve this problem w/o the need for a manual fix. R=iant CC=golang-dev https://golang.org/cl/5698078
This commit is contained in:
parent
ab169c6e3f
commit
b495e5c538
@ -41,6 +41,7 @@ func ExampleContainsAny() {
|
|||||||
func ExampleCount() {
|
func ExampleCount() {
|
||||||
fmt.Println(strings.Count("cheese", "e"))
|
fmt.Println(strings.Count("cheese", "e"))
|
||||||
fmt.Println(strings.Count("five", "")) // before & after each rune
|
fmt.Println(strings.Count("five", "")) // before & after each rune
|
||||||
|
|
||||||
// Output:
|
// Output:
|
||||||
// 3
|
// 3
|
||||||
// 5
|
// 5
|
||||||
|
Loading…
Reference in New Issue
Block a user