A
Andreas Leitgeb
I've got a file in a CSV-type format:
elem1:elem2:elem3
foo:xyz:fjhl
but sometimes some fields might also be empty:
:abc:jkfh
I've tried using a java.util.Scanner (on each line)
for this (with a delimiter of ":"), but it doesn't
account for empty fields, so in the third example
line, it would give me the "abc" as *first* element,
not as second. :-(
Is there some setting for Scanner that I've missed,
or is there something similar to Scanner that works
more like what I need,
or do I have to code that myself?
elem1:elem2:elem3
foo:xyz:fjhl
but sometimes some fields might also be empty:
:abc:jkfh
I've tried using a java.util.Scanner (on each line)
for this (with a delimiter of ":"), but it doesn't
account for empty fields, so in the third example
line, it would give me the "abc" as *first* element,
not as second. :-(
Is there some setting for Scanner that I've missed,
or is there something similar to Scanner that works
more like what I need,
or do I have to code that myself?