8 lines
174 B
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)
|
|
}
|