str3 := "chinese:日本語"
fmt.Println("index int(rune) rune char bytes")
for index, rune_ := range str3 {
fmt.Printf("%-2d %d %U '%c' % x\n", index, rune_, rune_, rune_, []byte(string(rune_)))
}
str := "G"
for i := 1; i <= 25; i++ {
print(str)
str += "G"
}
输出
index int(rune) rune char bytes
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG0 99 U+0063 'c' 63
1 104 U+0068 'h' 68
2 105 U+0069 'i' 69
3 110 U+006E 'n' 6e
4 101 U+0065 'e' 65
5 115 U+0073 's' 73
6 101 U+0065 'e' 65
7 58 U+003A ':' 3a
8 26085 U+65E5 '日' e6 97 a5
11 26412 U+672C '本' e6 9c ac
14 35486 U+8A9E '語' e8 aa 9e
G那行会变动行号
你是go run 运行的?还是在idea下面?