Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def removeDuplicateCharacters(str)
- string_length = str.length
- x = 0
- string = ""
- while (x < string_length)
- if str.count(str[x]) == 1 then
- string = string + str[x]
- end
- x = x + 1
- end
- return string
- end
Advertisement
Add Comment
Please, Sign In to add comment