mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2024-11-05 05:53:45 +00:00
[]rune类型转换表述不准确
This commit is contained in:
parent
72d00ab44a
commit
84b347297c
@ -119,7 +119,7 @@ for range s {
|
||||
|
||||
UTF8字符串作为交换格式是非常方便的,但是在程序内部采用rune序列可能更方便,因为rune大小一致,支持数组索引和方便切割。
|
||||
|
||||
string接受到[]rune的类型转换,可以将一个UTF8编码的字符串解码为Unicode字符序列:
|
||||
将[]rune类型转换应用到UTF8编码的字符串,将返回字符串编码的Unicode码点序列:
|
||||
|
||||
```Go
|
||||
// "program" in Japanese katakana
|
||||
|
Loading…
Reference in New Issue
Block a user