std::set and std::unordered_set on a string both pull out the unique characters only, but neither leaves the characters in the original order as they appeared in the string.
There's so much of the STL I am ignorant of, but I wondered if there was an STL way of getting just the unique characters from the string WITHOUT losing the original order and WITHOUT resorting to loops. I can do it with iterators, loops and, for example, std::remove , but I wondered if there was a more elegant way. This thought train was triggered by today's GeeksforGeeks problem, so the test string was "geEksforGEeks" which should end up as "geEksforG" (case sensitive, 'g' != 'G').
Thoughts?
There will be many options, like using std::remove_if, or in this example std::copy_if