mirror of
https://github.com/golang/go
synced 2024-11-19 22:04:44 -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:
parent
22671e7344
commit
e7628bee6e
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user