赞
踩
a := "你好,世界!" // 包含中文字符的字符串 a1 := string([]rune(a)[:4]) b := "你" // 包含中文字符的字符串 b1 := string([]rune(b)[:6]) c := "hello" // 包含中文字符的字符串 c1 := string([]rune(c)[:6])