summaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorhyzgh <31174102+hyzgh@users.noreply.github.com>2019-08-20 19:50:37 +0800
committerhyzgh <31174102+hyzgh@users.noreply.github.com>2019-08-21 18:08:30 +0800
commit5cb8bab84fe08b93191ed0385c016592d2ac7cc4 (patch)
treea30d2d0265082e83b54a85d647255d74cd59c319 /util.go
parentbd30e05dff3288bc54bb696a45c4ec45ceb1156d (diff)
fix split line bug
Change-Id: I224a7ec1af8386dcbef757c76389fb88316401bc
Diffstat (limited to 'util.go')
-rw-r--r--util.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.go b/util.go
index 3902500..99a1ba5 100644
--- a/util.go
+++ b/util.go
@@ -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
+}