mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-22 01:17:11 +08:00
14 lines
174 B
Go
14 lines
174 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
s := "hello"
|
|
fmt.Println(len(s))
|
|
|
|
s = "汉"
|
|
fmt.Println(len(s))
|
|
|
|
s = string([]byte{0xE6, 0xB1, 0x89})
|
|
fmt.Printf("%s\n", s)
|
|
}
|