diff options
author | 2013-10-09 17:53:58 -0700 | |
---|---|---|
committer | 2013-10-09 17:53:58 -0700 | |
commit | e398d09a50486d1b91ce109f4bd1a7529560c634 (patch) | |
tree | 9e983848fc561be46ab99231af2a25ede1889aeb /native/jni/src/utils/char_utils.h | |
parent | 1f8eab7d79f35d11162c45726b3ee95bbe7ad961 (diff) | |
parent | af75e48efdc5be7d0b1c3d411017757454ed1799 (diff) | |
download | latinime-e398d09a50486d1b91ce109f4bd1a7529560c634.tar.gz latinime-e398d09a50486d1b91ce109f4bd1a7529560c634.tar.xz latinime-e398d09a50486d1b91ce109f4bd1a7529560c634.zip |
am af75e48e: am 74577bed: Merge "Implement the heuristic for auto-commit."
* commit 'af75e48efdc5be7d0b1c3d411017757454ed1799':
Implement the heuristic for auto-commit.
Diffstat (limited to 'native/jni/src/utils/char_utils.h')
-rw-r--r-- | native/jni/src/utils/char_utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/native/jni/src/utils/char_utils.h b/native/jni/src/utils/char_utils.h index 2e735a81c..41663c81a 100644 --- a/native/jni/src/utils/char_utils.h +++ b/native/jni/src/utils/char_utils.h @@ -75,6 +75,16 @@ class CharUtils { return c; } + static AK_FORCE_INLINE int getSpaceCount(const int *const codePointBuffer, const int length) { + int spaceCount = 0; + for (int i = 0; i < length; ++i) { + if (codePointBuffer[i] == KEYCODE_SPACE) { + ++spaceCount; + } + } + return spaceCount; + } + static unsigned short latin_tolower(const unsigned short c); private: |