In java if I say:
String input = "3, 4, 5,,"
String[] s = input.split(",", -1)
The output should look like: '3'; ' 4'; ' 5'; ''; ''; Which is 5 symbols length.
Currently from what I see from the Internet the functions usually split up to the '5' [which does what a normal split, without the -1 does] and terminate as they don't think the last comma in the end means a empty character as well as the empty char following it, simply because after the last comma there is no another enclosing coma. Indeed even a space does not work.
Can you please hint me a good tested method which already works or I will have to write my own parser?