pronounss/backend/common/common.go

12 lines
222 B
Go
Raw Normal View History

2023-04-02 22:50:22 +02:00
// Package common contains functions and types common to all (or most) packages.
package common
import "unicode/utf8"
func StringLength(s *string) int {
if s == nil {
return -1
}
return utf8.RuneCountInString(*s)
}