跳到主要内容

判断字符串是否包含中文

const str = '你好'
/\p{Script=Han}/u.test(str) // true