Files
the-way-to-go_ZH_CN/eBook/exercises/chapter_6/strings_map.go
2015-03-03 12:25:25 -05:00

13 lines
243 B
Go
Executable File

// strings_map.go
package main
import (
"fmt"
"strings"
)
func main() {
asciiOnly := func(c rune) rune { if c > 127 { return ' ' }; return c }
fmt.Println(strings.Map(asciiOnly, "Jérôme Österreich"))
}
// J r me sterreich