Currently, when I import the CSV file line by line with String.split(",") if there is a line that looks like "foo,,bar,,fizz,,," the method returns an array of length 5, which looks like ["foo", "", "bar, "", "fizz"]. How do I get the method to return an array of length 8 being ["foo", "", "bar", "", "fizz, "", "", ""]?
Currently, when I import the CSV file line by line with String.split(,) if there
Share
There is another overload of
splitthat achieves that: