Skip to content
Snippets Groups Projects
Commit e7628bee authored by Russ Cox's avatar Russ Cox
Browse files

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
Branches
No related tags found
No related merge requests found
......@@ -383,9 +383,9 @@ func ExampleMap() {
}
func ExampleTrimLeft() {
fmt.Print(string(bytes.TrimLeft([]byte("+ 005400"), "+0 ")))
fmt.Print(string(bytes.TrimLeft([]byte("453gopher8257"), "0123456789")))
// Output:
// 5400
// gopher8257
}
func ExampleTrimLeftFunc() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment