From d6a3650ad71d8b071cf038ff8fe1c724b1ab74d0 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Wed, 15 Feb 2012 13:38:28 +1100 Subject: [PATCH] strings: add Bernardo O'Higgins example R=r, bradfitz CC=golang-dev, rogpeppe https://golang.org/cl/5673049 --- src/pkg/strings/example_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pkg/strings/example_test.go b/src/pkg/strings/example_test.go index 7aca82d6324..5ef0b93d15e 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"]