Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c33fc5f7 authored by Satoshi Kataoka's avatar Satoshi Kataoka Committed by Android Git Automerger
Browse files

am 447e96c0: Merge "add a function to char utils"

# Via Android (Google) Code Review (1) and Satoshi Kataoka (1)
* commit '447e96c0':
  add a function to char utils
parents aca66ac9 447e96c0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -72,5 +72,16 @@ inline static bool isSkippableCodePoint(const int codePoint) {
    // TODO: Do not hardcode here
    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
#endif // LATINIME_CHAR_UTILS_H