GoFrame gstr-字符串长度
LenRune
- 说明:
LenRune返回unicode字符串长度。 - 格式:
LenRune(str string) int- 示例:
func ExampleLenRune() {
var (
str = `GoFrame框架`
result = gstr.LenRune(str)
)
fmt.Println(result)
// Output:
// 9
}
LenRune返回unicode字符串长度。
LenRune(str string) intfunc ExampleLenRune() {
var (
str = `GoFrame框架`
result = gstr.LenRune(str)
)
fmt.Println(result)
// Output:
// 9
}