List of utility methods to do String Tokenize
List | tokenize(String text) Tokenize a string based on the Character whitespace List<String> result = new ArrayList<String>(); int loc = 0; while (loc < text.length()) { while (loc < text.length() && Character.isWhitespace(text.charAt(loc))) { loc++; if (loc < text.length()) { StringBuilder sb = new StringBuilder(); ... |
String[] | tokenize(String text, char separator) Splits a list's String representation into tokens. if (text == null) return null; if (text.length() == 0) return new String[] { "" }; int i = 0; int sep; List<String> list = new ArrayList<String>(); while ((sep = text.indexOf(separator, i)) >= 0) { ... |
List | tokenize(String text, char separator) tokenize List<String> list = new ArrayList<String>(); if (text != null && text.length() > 0) { char[] chars = text.toCharArray(); StringBuffer buf = new StringBuffer(""); for (int i = 0; i < chars.length; i++) { if (chars[i] != separator) { buf.append(chars[i]); } else { ... |
List | tokenize(String text, String delimiter) tokenize if (delimiter == null) { throw new RuntimeException("delimiter is null"); if (text == null) { return new ArrayList<String>(); List<String> pieces = new ArrayList<String>(); int start = 0; ... |
String[] | tokenize(String value) tokenize return value.split(delimiter);
|
List | tokenize(String value) tokenize List<String> result = new ArrayList<String>(); if (value != null) { for (String key : value.split("\\,")) { if (key.trim().length() > 0) result.add(key.trim()); return result; ... |
String | tokenize(String[] stringArray, String delimiter) tokenize StringBuffer bufferedString = new StringBuffer(); for (int idx = 0; idx < stringArray.length; idx++) { if ((idx + 1) != stringArray.length) { bufferedString.append(stringArray[idx]).append(delimiter); } else { bufferedString.append(stringArray[idx]); return bufferedString.toString(); |
String | tokenizeAutocomplete(String text, int minSize) Split words into smaller parts so these can be auto-completed if (minSize <= 0) { throw new IllegalArgumentException("minSize has to be higher than 0"); String[] words = splitTextToWords(text); String tokens = ""; for (String word : words) { if (word.length() > minSize) { for (int i = 0; i <= word.length() - minSize; ++i) { ... |
String[] | tokenizeClassName(final String className) tokenize Class Name String[] result = null; if (className != null) { result = className.split("\\."); return result; |
List | tokenizeDirectiveCall(String data) tokenize Directive Call List<String> tokens = new ArrayList<String>(); if (data == null) { return tokens; boolean inQuotedString = false; int endLastToken = -1; for (int i = 0; i < data.length(); i++) { boolean isEndToken = false; ... |