// Copyright 2019 github.com. All rights reserved. // Use of this source code is governed by github.com. package util import "unicode" // HasChinese 是否有汉字 func HasChinese(s string) bool { for _, v := range s { if unicode.Is(unicode.Scripts["Han"], v) { return true } } return false }