I'll go ahead and speak the unspeakable: you could cast away const from the pointer, and then modify the data. Of course by doing so you will be entering the realm of Undefined Behavior, and thereby introducing the possibility of crashes, incorrect results, Flying Nose Daemons, etc. But the compiler will allow you to do it, so if you're desperate and nothing else is sufficient, you could give it a try and see what happens. Keep in mind that even if it seems to work on your machine, that doesn't imply it will necessarily work on other platforms.
Before doing anything rash, though, I'd first try this: permanently allocate a large-enough char array, memcpy() the const string into said array, and modify the array however you need to. memcpy() is quite efficient, since (unlike your vector approach) it does not require any dynamic allocation or freeing of memory from the heap. See if that is fast enough for you.