I’ve a string that consists of duplicate values.I’m using split() method to split it into substrings.The problem is split() returns array of different values and i need to retain duplicate values.how to achieve this?
I’ve a string that consists of duplicate values.I’m using split() method to split it
Share
split doesn’t remove dupliates. It returns an array not a set.
prints