also, your [i+1] is safe on a string but would not work on other containers like a vector...
you can't say [last item] == [last item + 1] on most containers because [last item +1] is not valid memory. on a string, there is a hidden extra zero so its safe to tap.
there isnt a string only special snowflake algorithm built in for this, no.
it is less efficient that the set, but you can do something like:
std::transform (tolower or toupper)
which would make good uses of what c++ offers but is a very poor way to solve it. The problem is O(n) and the above is 2N+NlgN or so, much slower... and if you needed the original, it throws a copy in there too (though set is a partial copy, so that evens out).
the set trick is part of an extremely fast algorithm that you do not want to forget. It is useful for a variety of things, mostly sorting and counting and many things similar to counting.