public static Vector tokenizeString(String source,String separator){
  if (separator.length() == 1) {
    return tokenizeString(source,separator.charAt(0));
  }
  Vector tokenized=new Vector();
  int len=source.length();
  StringBuilder buf=new StringBuilder();
  for (int iter=0; iter < len; iter++) {
    char current=source.charAt(iter);
    if (separator.indexOf(current) > -1) {
      if (buf.length() > 0) {
        tokenized.addElement(buf.toString());
        buf=new StringBuilder();
      }
    }
 else {
      buf.append(current);
    }
  }
  if (buf.length() > 0) {
    tokenized.addElement(buf.toString());
  }
  return tokenized;
}

public static Vector tokenizeString ( String source , String separator ) { if ( separator . length ( ) == 1 ) { return tokenizeString ( source , separator . charAt ( 0 ) ) ; } Vector tokenized = new Vector ( ) ; int len = source . length ( ) ; StringBuilder buf = new StringBuilder ( ) ; for ( int iter = 0 ; iter < len ; iter ++ ) { char current = source . charAt ( iter ) ; if ( separator . indexOf ( current ) > - 1 ) { if ( buf . length ( ) > 0 ) { tokenized . addElement ( buf . toString ( ) ) ; buf = new StringBuilder ( ) ; } } else { buf . append ( current ) ; } } if ( buf . length ( ) > 0 ) { tokenized . addElement ( buf . toString ( ) ) ; } return tokenized ; }
breaks a string to multiple strings ( similar to string tokenizer )
