We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
str := "XBodyContentX" content := str[1 : len(str)-1]
s := "abcdefg" s = string([]byte(s)[:3]) fmt.Println(s) //得到 "abc" s := "a我cd" s = string([]rune(s)[:3]) fmt.Println(s) //得到 "a我c"