title: Swift 3: Split string into Array of Int
body: <p>I'm trying to split string into Array Of integers:</p>
  
  <pre><code>let stringNumbers = "1 2 10"
  var arrayIntegers = stringNumbers.characters.flatMap{Int(String($0))}
  </code></pre>
  
  <p>But my problem is I'm getting this output:</p>
  
  <pre><code>[1, 2, 1, 0]
  </code></pre>
  
  <p>When I should be getting this output:</p>
  
  <pre><code>[1, 2, 10]
  </code></pre>
  
  <p>What I'm doing wrong?</p>
  
  <p>I'll really appreciate your help.</p>