阅读(1329) (6)

GoFrame gstr-字符串长度

2022-04-11 15:13:16 更新

LenRune

  • 说明:​LenRune​返回​unicode​字符串长度。
  • 格式:

LenRune(str string) int

  • 示例:

func ExampleLenRune() {
	var (
		str    = `GoFrame框架`
		result = gstr.LenRune(str)
	)
	fmt.Println(result)

	// Output:
	// 9
}