mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:21:38 +08:00
update book code
This commit is contained in:
11
eBook/examples/chapter_7/for_string.go
Normal file
11
eBook/examples/chapter_7/for_string.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
s := "\u00ff\u754c"
|
||||
for i, c := range s {
|
||||
fmt.Printf("%d:%c ", i, c)
|
||||
}
|
||||
}
|
||||
// prints: 0:ÿ 2:界
|
Reference in New Issue
Block a user