aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/utils/char_utils.h
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-05-14 06:22:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-14 06:22:22 +0000
commitc1e86d3f491e65ae11b9dc8d932c3775c50394e4 (patch)
treeaf8b1f522098de8a91c12dca6c3f2752b05253df /native/jni/src/utils/char_utils.h
parent83be21a56362dfe8768a4a6743e3e2ac4ea21076 (diff)
parent79ba633402ceeebe216055cbd99a9e9701460f4a (diff)
downloadlatinime-c1e86d3f491e65ae11b9dc8d932c3775c50394e4.tar.gz
latinime-c1e86d3f491e65ae11b9dc8d932c3775c50394e4.tar.xz
latinime-c1e86d3f491e65ae11b9dc8d932c3775c50394e4.zip
Merge "Skip PtNodes with non-Unicode code points for suggestion."
Diffstat (limited to 'native/jni/src/utils/char_utils.h')
-rw-r--r--native/jni/src/utils/char_utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/native/jni/src/utils/char_utils.h b/native/jni/src/utils/char_utils.h
index 239419d5b..634c45b04 100644
--- a/native/jni/src/utils/char_utils.h
+++ b/native/jni/src/utils/char_utils.h
@@ -86,12 +86,19 @@ class CharUtils {
return spaceCount;
}
+ static AK_FORCE_INLINE int isInUnicodeSpace(const int codePoint) {
+ return codePoint >= MIN_UNICODE_CODE_POINT && codePoint <= MAX_UNICODE_CODE_POINT;
+ }
+
static unsigned short latin_tolower(const unsigned short c);
static const std::vector<int> EMPTY_STRING;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(CharUtils);
+ static const int MIN_UNICODE_CODE_POINT;
+ static const int MAX_UNICODE_CODE_POINT;
+
/**
* Table mapping most combined Latin, Greek, and Cyrillic characters
* to their base characters. If c is in range, BASE_CHARS[c] == c