TSmooth
July 18th, 2005, 07:41 AM
I was wondering what the best way to read in a space delimited file would be? I would love to just do a ReadLine() followed by a String.Split(" ") but the problem is that there is a variable amount of spaces between the values, not just one. Is there a way to make String.Split() treat consecutive delimiters as one? If not, what is the best way to read in a line of values and split them up? I have code that does this by reading one character at a time, checking if it is a space or tab and then reading and discarding until another non-space, non-tab character is found. It's pretty tedious though and I was wondering if there was an easier method.
- Tom
- Tom