I'm trying to break apart a string using indexOf() and the commas as reference points. it's easy to find the first comma and it's value but when i try to get the second comma's value it doesn't work.
Ex) String = 5, 8, 10
position1 = String.indexOf(",");
position2 = String.indexOf(",", position1); *shouldn't this search for commas afeter the initial comma? Instead pos1 and pos2 values are identical.*
How can i use indexOf() to search for the same character? It always returns the value of the first time it appears and thats it!