Avoid resizing a buffer frequently in String::data()

Avoid resizing a buffer frequently in ```String::data()```.