How can I read a text file and ignore whitespace?
I'm using a delimiter to parse commas in the file. When the file content has no spaces, the code runs, but when I put spaces between the words in the file, a NoSuchElement exception is thrown.
For example, here is a line:
This line is read just fine.
But if I change it to:
Jones, Jack, 3.5, Applied Math
A NoSuchElement exception occurs.