Java Utililty Methods String Tokenize

List of utility methods to do String Tokenize

Description

The list of methods to do String Tokenize are organized into topic(s).

Method

Listtokenize(final String s)
tokenize
return tokenize(" \t\n\r\u0085\u2028", s);
Listtokenize(String array, String delimiter)
Split string into tokens using delimiter
final List<String> tokens = Arrays.asList(array.split("\\s*" + delimiter + "\\s*"));
ArrayList<String> result = new ArrayList<>();
for (String token : tokens) {
    if (token != null && !token.trim().isEmpty()) {
        result.add(token.trim());
return result;
...
Listtokenize(String formula)
tokenize
ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < formula.length(); i++) {
    char c = formula.charAt(i);
    if (c == '\\') {
        if (i + 1 < formula.length()) {
            c = formula.charAt(i + 1);
            if ((c >= 'a' && c <= 'z') || (c >= 'a' && c <= 'z')) {
                int j = i + 2;
...
Listtokenize(String in)
tokenize
return Arrays.asList(in.split("\\s+"));
String[]tokenize(String input)
tokenize
return input.toLowerCase().split("\\s");
String[]tokenize(String input)
Take the given string and chop it up into a series of strings on whitespace boundries.
return tokenize(input, " \t\n\r\f");
String[]tokenize(String input)
Tokenizing helper.
if (input.contains(",")) { 
    String[] ret = input.split(",");
    for (String s : ret) {
        s.trim();
    return ret;
} else if (input.contains("\\t")) { 
    return input.split("\\t+");
...
Listtokenize(String input, char by)
Tokenizes a String by the specified character
return tokenize(input, by, false);
String[]tokenize(String input, String delim)
Method declaration
Vector v = new Vector();
StringTokenizer tk = new StringTokenizer(input, delim);
String strArray[];
while (tk.hasMoreTokens()) {
    v.addElement(tk.nextToken());
strArray = new String[v.size()];
v.copyInto(strArray);
...
Settokenize(String line)
tokenize
Set<String> set = new LinkedHashSet<>();
Collections.addAll(set, line.split(" "));
return set;