Resizes the string content to n characters.
If n is smaller than the current length of the string, the content is reduced to its first n characters, the rest being dropped.
The description above has been adapted from the std::string::resize page on cplusplus.com.