private static final List explode(String s, char sep) { ArrayList v = new ArrayList(); int j = 0; int k = 0; int l = s.length(); int i = 0; while (i < l) { if (sep==s.charAt(i)) {  if (i == k) { k++; } else { v.add(s.substring(k,i)); k=i+1; } } else {  } i++; } if (k != i) { v.add(s.substring(k,i));
private static final List explode(String s, String seps) { StringTokenizer tokens = new StringTokenizer(s, seps); List v = new ArrayList(); while (tokens.hasMoreTokens()) { v.add(tokens.nextToken());
  private static final List explode(String s, char sep) {    ArrayList v = new ArrayList();    int j = 0;                  //  non-white    int k = 0;                  // char after last white    int l = s.length();    int i = 0;    while (i < l) {      if (sep==s.charAt(i)) {        // is white - what do we do?        if (i == k) {           // skipping contiguous white          k++;        } else {                // last char wasn't white - word boundary!          v.add(s.substring(k,i));          k=i+1;        }      } else {                  // nonwhite        // let it advance      }      i++;    }    if (k != i) {               // leftover non-white chars      v.add(s.substring(k,i));    }    return v;  }