diff options
author | Andrew Gerrand <adg@golang.org> | 2012-02-15 13:38:28 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2012-02-15 13:38:28 +1100 |
commit | d6a3650ad71d8b071cf038ff8fe1c724b1ab74d0 (patch) | |
tree | 399cd96a113640f80676a6002c539e2ae02823b5 | |
parent | 932cdfbc4ce2cebd52bd3f52813a64c8e94217c0 (diff) | |
download | go-d6a3650ad71d8b071cf038ff8fe1c724b1ab74d0.tar.gz go-d6a3650ad71d8b071cf038ff8fe1c724b1ab74d0.zip |
strings: add Bernardo O'Higgins example
R=r, bradfitz
CC=golang-dev, rogpeppe
https://golang.org/cl/5673049
-rw-r--r-- | src/pkg/strings/example_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/strings/example_test.go b/src/pkg/strings/example_test.go index 7aca82d632..5ef0b93d15 100644 --- a/src/pkg/strings/example_test.go +++ b/src/pkg/strings/example_test.go @@ -93,10 +93,12 @@ func ExampleReplace() { // ["a" "b" "c"] // ["" "man " "plan " "canal panama"] // [" " "x" "y" "z" " "] +// [""] func ExampleSplit() { fmt.Printf("%q\n", strings.Split("a,b,c", ",")) fmt.Printf("%q\n", strings.Split("a man a plan a canal panama", "a ")) fmt.Printf("%q\n", strings.Split(" xyz ", "")) + fmt.Printf("%q\n", strings.Split("", "Bernardo O'Higgins")) } // ["a" "b,c"] |