Avoid double-resizing when appending a char to a string