GoFrame gstr-字符串长度

LenRune

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

	// Output:
	// 9
}

作者:andy,如若转载,请注明出处:https://www.web176.com/goframe/20920.html

(0)
打赏 支付宝 支付宝 微信 微信
andy的头像andy
上一篇 2023年5月18日
下一篇 2023年5月18日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注