string.go 130 B

12345678
  1. package util
  2. import "unicode/utf8"
  3. // StrLen utf8 string length
  4. func StrLen(s string) int {
  5. return utf8.RuneCountInString(s)
  6. }