title: Optimize the Algotithm
body: <p>So, i have a method</p>
  <pre><code>public void AddToSearch(List&lt;FullName&gt; fullNames)
          {
              foreach (var fullName in fullNames)
              {
                  if (fullName.Surname != null)
                      _sb.Append(fullName.Surname.Trim() + &quot; &quot;);
                  if (fullName.Name != null)
                      _sb.Append(fullName.Name.Trim() + &quot; &quot;);
                  if (fullName.Patronymic != null)
                      _sb.Append(fullName.Patronymic.Trim());
                  fullNamesList.Add(_sb.ToString().TrimEnd());
                  _sb.Clear();
              }
  </code></pre>
  <p>it takes a list of FullName and by using StringBuilder instance converts each element into a string(which format is &quot;$Surname $Name $Patronymic&quot;). At the end i put the result into my list. The Question is - how can i optimize  all of that &quot;Trim&quot; stuff. It bothers me that i use it in multiple occassions and i am pretty sure it effects the time.</p>