For a C++ string class, use the erase and length function:
This erase member takes the starting position (left-most) of the characters to remove, and takes in a second optional parameter which is the number of characters to remove. If the second parameter is not specified, all the characters from the starting position will be removed. (The erase thus shortens the string by the number of characters removed.)
Just for info, if your string is a C string, simply set the character after the last character to 0 (null terminate it):