title: Swift: sort an array of strings...of more or less numbers
body: <p>I have an array of strings, examples are as follows:</p>
  
  <pre><code>"0.125-0.25"
  "1-2"
  "50-100"
  "100-200"
  </code></pre>
  
  <p>The result of sorting these is: </p>
  
  <pre><code>"0.125-0.25"
  "1-2"
  "100-200"
  "50-100"
  </code></pre>
  
  <p>And if I append("1000-2000") to the array and then sort it will be:</p>
  
  <pre><code>"0.125-0.25"
  "1-2"
  "100-200"
  "1000-2000"
  "50-100"
  </code></pre>
  
  <p>But what I want is:</p>
  
  <pre><code>"0.125-0.25"
  "1-2"
  "50-100"
  "100-200"
  "1000-2000"
  </code></pre>
  
  <p>It's definitely an edge case, but I have been having luck on my own.  Thanks everyone.</p>