title: How to set maximum field width for a std::string with iomanip?
body: <p><code>std::setw()</code> sets the minimum field width for all output, and <code>std::setprecision()</code> is capable of affecting floats, but is there a way to set the maximum field width for a <code>std::string</code>, to achieve the same result as the following <code>printf()</code> format specifier: <code>%10.10s</code></p>
  
  <p>I am aware that <code>boost::format</code> may be capable of doing this, but I am looking for a solution that is strictly C++ standards only, no third party software.</p>