mercury/internal/utils/strings.go

8 lines
174 B
Go

package utils
import "unicode/utf8"
// StringLength returns the length of a string by counting runes.
func StringLength(s string) int {
return utf8.RuneCountInString(s)
}