I have a string of 11223.3445566.7788.9900
now I want to create a function where I can remove the duplicate of the specific character in that string and leave only the first in the left.
This is my example code on how for better explanation
let string = "11223.3445566.7788.9900"
let removedDuplicate = removeDuplicate(string: string, char: ".")
print(removedDuplicate) // result 11223.344556677889900
You see, Unlike here I only need to remove the duplicate of the specific character in the string, not all duplicated characters.