public static Array listToArray ( String list , char delimiter ) { if ( list . length ( ) == 0 ) return new ArrayImpl ( ) ; int len = list . length ( ) ; int last = 0 ; Array array = new ArrayImpl ( ) ; try { for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { array . append ( list . substring ( last , i ) ) ; last = i + 1 ; } } if ( last <= len ) array . append ( list . substring ( last ) ) ; } catch ( PageException e ) { } return array ; }
casts a list to Array object