mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:34:15 +08:00
原书此处有误,按照原著183页正文里应该是7.14 (#604)
page:183 Exercise 7.14: string_reverse.go:Write a program that reverses a string, so “Google” is printed as ” elgooG”. (Hint: use a slice of bytes and conversions.)If you coded a solution with two slices, try a variant which uses only one (Hint: use swapping) If you want to be able to reverse Unicode-strings: use [ ]int !
This commit is contained in:
@@ -117,7 +117,7 @@ FAIL
|
||||
|
||||
**练习 13.4:**[string_reverse_test.go](exercises/chapter_13/string_reverse_test.go)
|
||||
|
||||
为练习 7.11 [string_reverse.go](exercises/chapter_7/string_reverse.go) 写一个单元测试。
|
||||
为练习 7.14 [string_reverse.go](exercises/chapter_7/string_reverse.go) 写一个单元测试。
|
||||
|
||||
把 string_reverse 放到自己的包 strev 中,只包含一个可导出函数 reverse。
|
||||
|
||||
|
Reference in New Issue
Block a user