How can I create a string stream to write to?

How can I create a string stream to write to?