title: How add separator to string at every N characters in swift?
body: <p>I have a string which contains binary digits. How to separate it in to pairs of digits?</p>
  
  <p>Suppose the string is:</p>
  
  <pre><code>let x = "11231245"
  </code></pre>
  
  <p>I want to add a separator such as ":" (i.e., a colon) after each 2 characters.</p>
  
  <p>I would like the output to be:</p>
  
  <pre><code>"11:23:12:45"
  </code></pre>
  
  <p>How could I do this in Swift ?</p>