Is there a way to remove duplicate characters from a string like they can be removed from vectors as below
sort( vec.begin(), vec.end() );
vec.erase( unique( vec.begin(), vec.end() ), vec.end() );
or do I just have to code up a basic solution for it? What I have thought:
I could add all the characters into a set
See Question&Answers more detail:os