Commit d6a3650a authored by Andrew Gerrand's avatar Andrew Gerrand

strings: add Bernardo O'Higgins example

R=r, bradfitz
CC=golang-dev, rogpeppe
https://golang.org/cl/5673049
parent 932cdfbc
......@@ -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"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment