title: How to remove leading and trailing spaces from a string
body: <p>I have the following input:</p>
  
  <pre><code>string txt = "                   i am a string                                    "
  </code></pre>
  
  <p>I want to remove space from start of starting and end from a string.</p>
  
  <p>The result should be:  <code>"i am a string"</code></p>
  
  <p>How can I do this in c#?</p>