title: Inserting a character in String (Swift)
body: <p>I have a String "000". I want to change this to "0.00".</p>
  
  <p>I took a look at the insert function.</p>
  
  <pre><code>var str = "000"
  str.insert(".", at: str.endIndex)
  </code></pre>
  
  <p>How do I get the index of 2 before the end index?</p>
  
  <p>I tried:</p>
  
  <pre><code>str.insert(".", at: str.endIndex - 1)
  </code></pre>
  
  <p>but this didn't work at all.</p>