answer/pkg/checker/chinese.go

13 lines
166 B
Go

package checker
import "unicode"
func IsChinese(str string) bool {
for _, v := range str {
if unicode.Is(unicode.Han, v) {
return true
}
}
return false
}