If anything, this code sounds like it needs to be written in terms of iterators whose value type is `char`. That way, it's zounds more readable, probably more well-behaved and more natural to C++.
I think passing around a container like this is an odd code smell. I do understand that it may be desirable to accept generic containers and simply pass them around but so far, I don't think the OP has come back and explained what they're trying to actually accomplish. Because each container's interface should be treated as unique, something about what the OP is asking sounds fishy.