1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:14:43 -07:00

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: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
Russ Cox 2017-11-13 21:21:59 -05:00
parent 22671e7344
commit e7628bee6e

View File

@ -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() {