public static String[] split(String original,String separator){
  Vector nodes=new Vector();
  int index=original.indexOf(separator);
  while (index >= 0) {
    nodes.addElement(original.substring(0,index));
    original=original.substring(index + separator.length());
    index=original.indexOf(separator);
  }
  nodes.addElement(original);
  String[] ret=new String[nodes.size()];
  for (int i=0; i < nodes.size(); i++) {
    ret[i]=(String)nodes.elementAt(i);
  }
  return ret;
}

public static String [ ] split ( String original , String separator ) { Vector nodes = new Vector ( ) ; int index = original . indexOf ( separator ) ; while ( index >= 0 ) { nodes . addElement ( original . substring ( 0 , index ) ) ; original = original . substring ( index + separator . length ( ) ) ; index = original . indexOf ( separator ) ; } nodes . addElement ( original ) ; String [ ] ret = new String [ nodes . size ( ) ] ; for ( int i = 0 ; i < nodes . size ( ) ; i ++ ) { ret [ i ] = ( String ) nodes . elementAt ( i ) ; } return ret ; }
provides a utility method breaks a given string to array of string according to the given separator
