public static Array listToArray(String list,String delimiter){
  if (delimiter.length() == 1)   return listToArray(list,delimiter.charAt(0));
  if (list.length() == 0)   return new ArrayImpl();
  if (delimiter.length() == 0) {
    int len=list.length();
    ArrayImpl array=new ArrayImpl();
    array.appendEL("");
    for (int i=0; i < len; i++) {
      array.appendEL(list.charAt(i));
    }
    array.appendEL("");
    return array;
  }
  int len=list.length();
  int last=0;
  char[] del=delimiter.toCharArray();
  char c;
  ArrayImpl array=new ArrayImpl();
  try {
    for (int i=0; i < len; i++) {
      c=list.charAt(i);
      for (int y=0; y < del.length; y++) {
        if (c == del[y]) {
          array.appendEL(list.substring(last,i));
          last=i + 1;
          break;
        }
      }
    }
    if (last <= len)     array.append(list.substring(last));
  }
 catch (  ExpressionException e) {
  }
  return array;
}

public static Array listToArray ( String list , String delimiter ) { if ( delimiter . length ( ) == 1 ) return listToArray ( list , delimiter . charAt ( 0 ) ) ; if ( list . length ( ) == 0 ) return new ArrayImpl ( ) ; if ( delimiter . length ( ) == 0 ) { int len = list . length ( ) ; ArrayImpl array = new ArrayImpl ( ) ; array . appendEL ( "" ) ; for ( int i = 0 ; i < len ; i ++ ) { array . appendEL ( list . charAt ( i ) ) ; } array . appendEL ( "" ) ; return array ; } int len = list . length ( ) ; int last = 0 ; char [ ] del = delimiter . toCharArray ( ) ; char c ; ArrayImpl array = new ArrayImpl ( ) ; try { for ( int i = 0 ; i < len ; i ++ ) { c = list . charAt ( i ) ; for ( int y = 0 ; y < del . length ; y ++ ) { if ( c == del [ y ] ) { array . appendEL ( list . substring ( last , i ) ) ; last = i + 1 ; break ; } } } if ( last <= len ) array . append ( list . substring ( last ) ) ; } catch ( ExpressionException e ) { } return array ; }
casts a list to array object
