aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/StringUtils.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-05-28 04:41:59 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-28 04:41:59 -0700
commit87d773cbd7ce3706c5193e50412562724bab46b0 (patch)
tree3c733ca9da5cde19aed36cdef7cb95b0db69ec0c /java/src/com/android/inputmethod/latin/StringUtils.java
parent86f32b06b0a6b52d366a5ca39cde99024558af41 (diff)
parent39bd6ea0dce5b7f18c337a7299520b78caa92b9c (diff)
downloadlatinime-87d773cbd7ce3706c5193e50412562724bab46b0.tar.gz
latinime-87d773cbd7ce3706c5193e50412562724bab46b0.tar.xz
latinime-87d773cbd7ce3706c5193e50412562724bab46b0.zip
am 39bd6ea0: Merge "Rename StringUtils.parseCsvString to KeySpecParser.splitKeySpecs"
* commit '39bd6ea0dce5b7f18c337a7299520b78caa92b9c': Rename StringUtils.parseCsvString to KeySpecParser.splitKeySpecs
Diffstat (limited to '')
-rw-r--r--java/src/com/android/inputmethod/latin/StringUtils.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/java/src/com/android/inputmethod/latin/StringUtils.java b/java/src/com/android/inputmethod/latin/StringUtils.java
index 988b7f60e..c2fd4fb32 100644
--- a/java/src/com/android/inputmethod/latin/StringUtils.java
+++ b/java/src/com/android/inputmethod/latin/StringUtils.java
@@ -153,44 +153,6 @@ public final class StringUtils {
return codePoints;
}
- public static String[] parseCsvString(final String text) {
- final int size = text.length();
- if (size == 0) {
- return null;
- }
- if (codePointCount(text) == 1) {
- return text.codePointAt(0) == Constants.CSV_SEPARATOR ? null : new String[] { text };
- }
-
- ArrayList<String> list = null;
- int start = 0;
- for (int pos = 0; pos < size; pos++) {
- final char c = text.charAt(pos);
- if (c == Constants.CSV_SEPARATOR) {
- // Skip empty entry.
- if (pos - start > 0) {
- if (list == null) {
- list = CollectionUtils.newArrayList();
- }
- list.add(text.substring(start, pos));
- }
- // Skip comma
- start = pos + 1;
- } else if (c == Constants.CSV_ESCAPE) {
- // Skip escape character and escaped character.
- pos++;
- }
- }
- final String remain = (size - start > 0) ? text.substring(start) : null;
- if (list == null) {
- return remain != null ? new String[] { remain } : null;
- }
- if (remain != null) {
- list.add(remain);
- }
- return list.toArray(new String[list.size()]);
- }
-
// This method assumes the text is not null. For the empty string, it returns CAPITALIZE_NONE.
public static int getCapitalizationType(final String text) {
// If the first char is not uppercase, then the word is either all lower case or