|
|
@@ -48,7 +48,7 @@ type binOp func(a, b int) int
|
|
|
func run(op binOp, req *Request) { … }
|
|
|
```
|
|
|
|
|
|
-**练习 6.7** [strings_map.go](exercises\chapter_6\strings_map.go)
|
|
|
+**练习 6.7** [strings_map.go](exercises/chapter_6/strings_map.go)
|
|
|
|
|
|
包 `strings` 中的 `Map()` 函数和 `strings.IndexFunc()` 一样都是非常好的使用例子。请学习它的源代码并基于该函数书写一个程序,要求将指定文本内的所有非 ASCII 字符替换成问号 `'?'` 或空格 `' '`。您需要怎么做才能删除这些字符呢?
|
|
|
|