If you simply set the character or slot to 0, would it not cause some problems if you used functions like strlen(), or sizeof() ?
This is what I would do but only in small strings or small programs due to the fact that it can use up alot of memory if the string is big enough. Or if i was to need any of the functions stated above.
The logic: Simply create two buffers or Strings with appropriate sizes, then copy one character at a time to the other buffer, omitting the characters that are unwanted. To help save some memory, you could run a for loop through the string to count how many characters you would be omitting, then create the second buffer that many slots smaller then the orig. then run another for loop to transfer the characters.
Sounds over complicating but it would be more accurate.