Wednesday, 11 September 2013

Splitting a String into tokens

Splitting a String into tokens

I would like to split a String into tokens that are stored in an array.
However i don not think I am able to use delimiters as the strings
information is not separated by a specific set of characters. The
information is however always separated by varying amounts of white space.
Like this:
0 147 530.936 1 656.336 -1.12709 656.336 -0.52921
-0.0131993 -0.882138 0 20 0 0 0.878423
0 1.4013E-045 0
My question is, is there a way to use the varying amounts of white space
as delimiters, in order to tokenize the string?

No comments:

Post a Comment