WriteToString

A function to create and append to a temporary string builder.