Change-Id: I9c0c601ec5957475e949dcc4a8c2116724d01215
Reviewed-on: https://go-review.googlesource.com/48961
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
// Output: ["Achtung! Achtung"]
}
+func ExampleTrimFunc() {
+ f := func(c rune) bool {
+ return !unicode.IsLetter(c) && !unicode.IsNumber(c)
+ }
+ fmt.Printf("[%q]", strings.TrimFunc(" Achtung1! Achtung2,...", f))
+ // Output: ["Achtung1! Achtung2"]
+}
+
func ExampleMap() {
rot13 := func(r rune) rune {
switch {