public static String [ ] tokenizeUnquoted ( String s ) { List tokens = new LinkedList ( ) ; int first = 0 ; while ( first < s . length ( ) ) { first = skipWhitespace ( s , first ) ; int last = scanToken ( s , first ) ; if ( first < last ) { tokens . add ( s . substring ( first , last ) ) ; } first = last ; } return ( String [ ] ) tokens . toArray ( new String [ tokens . size ( ) ] ) ; }
This method tokenizes a string by space characters but ignores spaces in quoted parts that are parts in or . The method does allows the usage of in and in . The space character between tokens is not returned .