title: formatting to wstring simpler way of doing it
body: <p>I need to format a double. I use the code bellow</p>
  
  <pre><code>wstring to_wstring1(double f){
    wchar_t wc[0x40];swprintf(wc,countof(wc),L"%E",f);return wstring(wc);
  }
  </code></pre>
  
  <p>Is there a way to do it that avoids using the buffer wc?
  I am thinking to allocate a wstring with the size of the buffer and write there and after resize the string up to the final 0. Is there a simpler way?</p>