mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-11-13 09:16:10 +08:00
第六章:修复 strings_map.go 引用 (#848)
This commit is contained in:
@@ -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 字符替换成问号 `'?'` 或空格 `' '`。您需要怎么做才能删除这些字符呢?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user