diff options
author | 2013-05-28 13:31:56 +0900 | |
---|---|---|
committer | 2013-05-28 20:23:37 +0900 | |
commit | dbed20ad8d48e9b42b52c522c54bfd9e62553f7a (patch) | |
tree | 27bc100c31f8d5aad157e35bf4b1e150fe42c450 /java/src/com/android/inputmethod/latin/StringUtils.java | |
parent | a2d8d30f8eba001742099096da53e42e77dd367a (diff) | |
download | latinime-dbed20ad8d48e9b42b52c522c54bfd9e62553f7a.tar.gz latinime-dbed20ad8d48e9b42b52c522c54bfd9e62553f7a.tar.xz latinime-dbed20ad8d48e9b42b52c522c54bfd9e62553f7a.zip |
Rename StringUtils.parseCsvString to KeySpecParser.splitKeySpecs
Change-Id: I16e3f3ebc43772cfd96c824afeddfd225404b857
Diffstat (limited to 'java/src/com/android/inputmethod/latin/StringUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/StringUtils.java | 38 |
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 ab050d7a3..6a7f99a78 100644 --- a/java/src/com/android/inputmethod/latin/StringUtils.java +++ b/java/src/com/android/inputmethod/latin/StringUtils.java @@ -131,44 +131,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 |