mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 447e96c0
: Merge "add a function to char utils"
# Via Android (Google) Code Review (1) and Satoshi Kataoka (1) * commit '447e96c057b9fd15697b5ef86d187e146a8754b4': add a function to char utils
This commit is contained in:
commit
c33fc5f79c
@ -72,5 +72,16 @@ inline static bool isSkippableCodePoint(const int codePoint) {
|
|||||||
// TODO: Do not hardcode here
|
// TODO: Do not hardcode here
|
||||||
return codePoint == KEYCODE_SINGLE_QUOTE || codePoint == KEYCODE_HYPHEN_MINUS;
|
return codePoint == KEYCODE_SINGLE_QUOTE || codePoint == KEYCODE_HYPHEN_MINUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static int getCodePointCount(const int arraySize, const int *const codePoints) {
|
||||||
|
int size = 0;
|
||||||
|
for (; size < arraySize; ++size) {
|
||||||
|
if (codePoints[size] == '\0') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace latinime
|
} // namespace latinime
|
||||||
#endif // LATINIME_CHAR_UTILS_H
|
#endif // LATINIME_CHAR_UTILS_H
|
||||||
|
Loading…
Reference in New Issue
Block a user