diff options
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -444,3 +444,11 @@ func remove(arr []int, key int) []int { } return append(arr[:n], arr[n+1:]...) } + +func isChinese(rune2 rune) bool { + // chinese unicode: 4e00-9fa5 + if rune2 >= rune(0x4e00) && rune2 <= rune(0x9fa5) { + return true + } + return false +} |