title: Fastest way to trim a string and convert it to lower case
body: <p>I've written a class for processing strings and I have the following problem: the string passed in can come with spaces at the beginning and at the end of the string. </p>
  
  <p>I need to trim the spaces from the strings and convert them to lower case letters. My code so far:</p>
  
  <pre><code>var searchStr = wordToSearchReplacemntsFor.ToLower();
          searchStr = searchStr.Trim();
  </code></pre>
  
  <p>I couldn't find any function to help me in <code>StringBuilder</code>. The problem is that this class is supposed to process a lot of strings as quickly as possible.  So I don't want to be creating 2 new strings for each string the class processes. </p>
  
  <p>If this isn't possible, I'll go deeper into the processing algorithm.</p>