Skip to content
Snippets Groups Projects
Commit 75070a51 authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

add a function to char utils

Change-Id: Id0b45a824a4655d8aba1bf6e1c6df3acd2cbe850
parent 9d18c6dd
No related branches found
No related tags found
No related merge requests found
...@@ -72,5 +72,16 @@ inline static bool isSkippableCodePoint(const int codePoint) { ...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment