title: What are the supported Swift String format specifiers?
body: <p>In Swift, I can format a String with format specifiers:</p>
  
  <pre><code>// This will return "0.120"
  String(format: "%.03f", 0.12)
  </code></pre>
  
  <p>But the official documentation is not giving any information or link regarding the supported format specifiers or how to build a template similar to <code>"%.03f"</code>: <a href="https://developer.apple.com/documentation/swift/string/3126742-init" rel="noreferrer">https://developer.apple.com/documentation/swift/string/3126742-init</a></p>
  
  <p>It only says:</p>
  
  <blockquote>
    <p>Returns a String object initialized by using a given format string as a template into which the remaining argument values are substituted.</p>
  </blockquote>