title: Best way to empty stringstream?
body: <p>One of the possibilities is:</p>
  
  <pre><code>somestringstream.str("");
  </code></pre>
  
  <p>But is it most optimal? Is there any way to preserve stringstream internal buffer, so that following operator&lt;&lt;() calls would not require to reserve memory again?</p>