title: Using * Width & Precision Specifiers With boost::format
body: <p>I am trying to use width and precision specifiers with <code>boost::format</code>, like this:</p>
  
  <pre><code>#include &lt;boost\format.hpp&gt;
  #include &lt;string&gt;
  
  int main()
  {
      int n = 5;
      std::string s = (boost::format("%*.*s") % (n*2) % (n*2) % "Hello").str();
      return 0;
  }
  </code></pre>
  
  <p>But this doesn't work because <code>boost::format</code> doesn't support the <code>*</code> specifier.  Boost throws an exception when parsing the string.</p>
  
  <p>Is there a way to accomplish the same goal, preferably using a drop-in replacement?</p>