If I have a string like: 1,1,2,3,3,3,4,5,5
How do I retrieve only unique numbers (or remove duplicates) from the string?
The desired result would be: 1,2,3,4,5
Develop games in your browser. Powerful, performant & highly capable.
You can use a dictionary for that. So basically use tokenat to get each number from the string and add a key to a dictionary. Duplicates will be the same key.
Then you can loop over the keys and add it to a string and there will be no duplicates.
Didn't know about that behavior, thanks for the suggestion!