mercury/internal/utils/strings.go

9 lines
174 B
Go
Raw Normal View History

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