diff options
author | 2013-04-10 01:58:42 -0700 | |
---|---|---|
committer | 2013-04-10 01:58:42 -0700 | |
commit | 2dd2e2d7dff8c4446d536bd23fc94a5538c24ddf (patch) | |
tree | d0bfe2da175bf91f87420267c923f3df36b55bf4 /java/src/com/android/inputmethod/latin/StringUtils.java | |
parent | c35bca685689ff6430e7a9393af64c74112bf677 (diff) | |
parent | 99b93d17d53c2d587c45373831b327f7851ec0a8 (diff) | |
download | latinime-2dd2e2d7dff8c4446d536bd23fc94a5538c24ddf.tar.gz latinime-2dd2e2d7dff8c4446d536bd23fc94a5538c24ddf.tar.xz latinime-2dd2e2d7dff8c4446d536bd23fc94a5538c24ddf.zip |
am 99b93d17: Fix a bug where autocorrection status would be wrong.
* commit '99b93d17d53c2d587c45373831b327f7851ec0a8':
Fix a bug where autocorrection status would be wrong.
Diffstat (limited to '')
-rw-r--r-- | java/src/com/android/inputmethod/latin/StringUtils.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/StringUtils.java b/java/src/com/android/inputmethod/latin/StringUtils.java index 4de104af5..11ef60dc9 100644 --- a/java/src/com/android/inputmethod/latin/StringUtils.java +++ b/java/src/com/android/inputmethod/latin/StringUtils.java @@ -106,16 +106,17 @@ public final class StringUtils { } } - public static String capitalizeFirstCharacter(final String s, final Locale locale) { + public static String capitalizeFirstCodePoint(final String s, final Locale locale) { if (s.length() <= 1) { return s.toUpperCase(locale); } - // Please refer to the comment below in {@link #toTitleCase(String,Locale)}. + // Please refer to the comment below in + // {@link #capitalizeFirstAndDowncaseRest(String,Locale)} as this has the same shortcomings final int cutoff = s.offsetByCodePoints(0, 1); return s.substring(0, cutoff).toUpperCase(locale) + s.substring(cutoff); } - public static String toTitleCase(final String s, final Locale locale) { + public static String capitalizeFirstAndDowncaseRest(final String s, final Locale locale) { if (s.length() <= 1) { return s.toUpperCase(locale); } |