If I read in a single line from a text file that contains a known delimiter, how can I:
a) split it up into the various parts
b) make sure that the respective parts are the respective types: a filename string, ints, and possibly others
It's also possible that one of the 'parts' is missing in a string, for example something like this:
filename.ext|5000|750 <-- all values present
filename.ext|2500| <-- missing last value
filename.ext||500 <-- missing second value
filename.ext|| <-- missing all values
should all be considered valid. The delimiters are always there, however anything after the filename is optional and should translate to either zero or null. The program will test for those values and react accordingly.