Commit e7628bee authored by Russ Cox's avatar Russ Cox

bytes: make ExampleTrimLeft and ExampleTrimRight match

ExampleTrimLeft was inexplicably complex.

Change-Id: I13ca81bdeba728bdd632acf82e3a1101d29b9f39
Reviewed-on: https://go-review.googlesource.com/78111
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
parent 22671e73
...@@ -383,9 +383,9 @@ func ExampleMap() { ...@@ -383,9 +383,9 @@ func ExampleMap() {
} }
func ExampleTrimLeft() { func ExampleTrimLeft() {
fmt.Print(string(bytes.TrimLeft([]byte("+ 005400"), "+0 "))) fmt.Print(string(bytes.TrimLeft([]byte("453gopher8257"), "0123456789")))
// Output: // Output:
// 5400 // gopher8257
} }
func ExampleTrimLeftFunc() { func ExampleTrimLeftFunc() {
......
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