So, I'm having this problem and I have no idea how to handle it Say I have a string with the following format:
"3 6 9 12 13 15 16"
I'm searching for "6" and I find it at position 3, and I remove it. Next, I search for 6 again, and I find it at position IndexOf(6) (whatever that is). This time I don't want to remove it because it's the 6 in 16.
if string1.contains(6) then
string1 = string1.RemoveAt(string.IndexOf(6),2)
end if
This is vbnet, but any solution to this problem would help.
P.S. This is just a sample code, the main code I'm using has too many things attached to it, and cleaning it for this example would be a nightmare
stringis rather dubious