title: Check if a string is sorted
body: <p>I have a string, simplified <code>"12345"</code> which is sorted. The string couild contain Digits (0-9) or letters (a-z). In case of a mixed use the natural sort order. I need a method to verify if this is true. </p>
  
  <p>Attempt with linq technique:</p>
  
  <pre><code>string items1 = "2349"; //sorted
  string items2 = "2476"; //not sorted, 6&lt;&gt;7
  
  bool sorted1 = Enumerable.SequenceEqual(items1.OrderBy(x =&gt; x), items1); //true
  bool sorted2 = Enumerable.SequenceEqual(items2.OrderBy(x =&gt; x), items2); //false
  </code></pre>
  
  <p>but there could be also a descending sort order.</p>
  
  <p>Is there a better way then</p>
  
  <pre><code>string items3 = "4321";
  bool sorted3 = Enumerable.SequenceEqual(items3.OrderBy(x =&gt; x), items3) || Enumerable.SequenceEqual(items3.OrderByDescending(x =&gt; x), items3);
  </code></pre>
  
  <p>to check if a string is sorted? Maybe some built in solution?</p>