title: Center Rust string in a number of characters
body: <p>I have been reading up on <code>format!</code> and all of the <a href="https://doc.rust-lang.org/std/fmt/index.html" rel="nofollow noreferrer">formatting options</a> and saw there was a beautiful way of centering a string of text using either <code>&lt;</code>, <code>^</code> or <code>&gt;</code>. Rather than centering a string in whitespace, is it possible to center it in a character?</p>
  
  <pre><code>{:^32} // Centers it nicely in 32 characters of whitespace
  </code></pre>
  
  <p>I was thinking something like:</p>
  
  <pre><code>{:^32'c'} // But this does not work
  </code></pre>
  
  <p>I have tried almost every way thinkable, except those that seem way too crazy. But luckily there is <em>Stack Overflow</em>!</p>
  
  <p>Is it possible to center a string using numbers to achieve something like the following?</p>
  
  <blockquote>
    <p>--------SO is AWESOME--------</p>
  </blockquote>