im trying to split a string but keep the delimiter at the beginning of the next token (if thats possible)
Example: I\'m trying to split the string F120LF120L
F120LF120L
From the docs, you can use StringTokenizer st = new StringTokenizer(str, "L", true); The last parameter is a boolean that specifies that delimiters have to be returned too.
StringTokenizer st = new StringTokenizer(str, "L", true);