I'm trying to parse arguments for a command, but if I were to put multiple spaces in a row, String.split() will leave empty Strings in the result array. Is there a way I can get rid of this?
For example: "abc 123".split(" ")
results in {"abc", "", "", "", "", "123"}
but what I really want is {"abc", "123"}