title: How to remove new line characters from a string?
body: <p>I have a string in the following format</p>
  
  <pre><code>string s = "This is a Test String.\n   This is a next line.\t This is a tab.\n'
  </code></pre>
  
  <p>I want to remove all the occurrences of <code>\n</code> and <code>\r</code> from the string above.</p>
  
  <p>I have tried <code>string s = s.Trim(new char[] {'\n', '\r'});</code> but it didn't help.</p>