code: public static String[] toArray( final String source,
                                      final String delim,
                                      final boolean returnDelims )
      {
          List<String> tmp = toList( source, delim, returnDelims );
          String[] result = new String[tmp.size()];
  
          int index = 0;
          for ( String str : tmp )
          {
              result[index++] = str;
          }
  
          return result;
      }
docs: Different from split in that it can handle several single character
  delimiters.
  <p>
  
  @param source
  a <code>String</code> to be turned into a list.
  @param delim
  the potential delimiters of the tokens.
  @param returnDelims
  if true, the delimiters are returned in the list.
  @return split string array