From 5cb8bab84fe08b93191ed0385c016592d2ac7cc4 Mon Sep 17 00:00:00 2001 From: hyzgh <31174102+hyzgh@users.noreply.github.com> Date: Tue, 20 Aug 2019 19:50:37 +0800 Subject: fix split line bug Change-Id: I224a7ec1af8386dcbef757c76389fb88316401bc --- util.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util.go') 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 +} -- cgit v1.2.1-24-ge1ad