I am trying to parse a text file containing a variable number of words and numbers per line, for example:
foo 4.500 bar 3.00
1.3 3 foo bar
How can I read a file limited to spaces instead of newlines? Is there a way that I can set a method File("file.txt").foreachto use spaces instead of newlines as a separator?
source
share