Search bigrams for the lower case version of the word (A46)
...if there aren't any for the exact case version.
Bug: 6752830
Change-Id: I2737148b01ba04a64febe009ceb2ef53c265d224
diff --git a/native/jni/src/char_utils.h b/native/jni/src/char_utils.h
index 607dc51..21dca9a 100644
--- a/native/jni/src/char_utils.h
+++ b/native/jni/src/char_utils.h
@@ -50,8 +50,7 @@
return c;
}
-inline static unsigned short toBaseLowerCase(unsigned short c) {
- c = toBaseChar(c);
+inline static unsigned short toLowerCase(const unsigned short c) {
if (isAsciiUpper(c)) {
return toAsciiLower(c);
} else if (isAscii(c)) {
@@ -60,6 +59,10 @@
return latin_tolower(c);
}
+inline static unsigned short toBaseLowerCase(const unsigned short c) {
+ return toLowerCase(toBaseChar(c));
+}
+
} // namespace latinime
#endif // LATINIME_CHAR_UTILS_H