diff options
author | Daisuke Miyakawa <dmiyakawa@google.com> | 2009-06-26 22:58:32 +0900 |
---|---|---|
committer | Daisuke Miyakawa <dmiyakawa@google.com> | 2009-07-09 13:48:01 +0900 |
commit | e919af569c13d7445daf20cb06867e186afba92a (patch) | |
tree | edaa609e11bec2504ec368ea8dabc4d1a91ffeab /android/PhoneticStringUtils.h | |
parent | f06f5fa351ded0b9e04e15efa7e34f0f085fc9df (diff) |
Make PhoneticStringUtils use functions in String8 instead of using locally developped functions.
This change depends on https://android-git.corp.google.com/g/Gerrit#change,5510
Internal bug id: 1707173
Diffstat (limited to 'android/PhoneticStringUtils.h')
-rw-r--r-- | android/PhoneticStringUtils.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/android/PhoneticStringUtils.h b/android/PhoneticStringUtils.h index 68a4928..9da7d29 100644 --- a/android/PhoneticStringUtils.h +++ b/android/PhoneticStringUtils.h @@ -18,6 +18,7 @@ #define _ANDROID_PHONETIC_STRING_UTILS_H #include <string.h> // For size_t. +#include <utils/String8.h> namespace android { @@ -31,8 +32,8 @@ int GetCodePointFromUtf8(const char *src, size_t len, size_t index, int *next); // is "consumed" (e.g. Japanese halfwidth katakana's voiced mark is consumed // when previous "codepoint" is appropriate). If the codepoint should not be // considered when sorting (e.g. whitespaces), -1 is returned. -int GetPhoneticallySortableCodePoint(int codepoint, - int next_codepoint, +int GetPhoneticallySortableCodePoint(char32_t codepoint, + char32_t next_codepoint, bool *next_is_consumed); // Returns codepoint which is "normalized", whose definition depends on each @@ -44,8 +45,8 @@ int GetPhoneticallySortableCodePoint(int codepoint, // // In Japanese, "normalized" means that half-width and full-width katakana is // appropriately converted to hiragana. -int GetNormalizedCodePoint(int codepoint, - int next_codepoint, +int GetNormalizedCodePoint(char32_t codepoint, + char32_t next_codepoint, bool *next_is_consumed); // Pushes Utf8 expression of "codepoint" to "dst". Returns true when successful. |