From: Robin Eklind Date: Mon, 16 Dec 2013 18:40:28 +0000 (-0800) Subject: strings: Update Trim example. X-Git-Tag: go1.3beta1~1223 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7b53e32e0bfda3bf63c608a83a46a75c7d2e969f;p=gostls13.git strings: Update Trim example. Use an input which better shows that behaviour of the function. Only leading and trailing runes are trimed, not intermediate ones. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/42390043 --- diff --git a/src/pkg/strings/example_test.go b/src/pkg/strings/example_test.go index ccfc4172c3..7350131b85 100644 --- a/src/pkg/strings/example_test.go +++ b/src/pkg/strings/example_test.go @@ -150,8 +150,8 @@ func ExampleToTitle() { } func ExampleTrim() { - fmt.Printf("[%q]", strings.Trim(" !!! Achtung !!! ", "! ")) - // Output: ["Achtung"] + fmt.Printf("[%q]", strings.Trim(" !!! Achtung! Achtung! !!! ", "! ")) + // Output: ["Achtung! Achtung"] } func ExampleMap() {