title: Capitalizing words in a string using C#
body: <p>I need to take a string, and capitalize words in it. Certain words (&quot;in&quot;, &quot;at&quot;, etc.), are not capitalized and are changed to lower case if encountered. The first word should always be capitalized. Last names like &quot;McFly&quot; are not in the current scope, so the same rule will apply to them - only first letter capitalized.</p>
  <p>For example: &quot;of mice and men By CNN&quot; should be changed to &quot;Of Mice and Men by CNN&quot;. (<strong>Therefore ToTitleString won't work here</strong>.)</p>
  <p>What would be the best way to do that?</p>
  <p>I thought of splitting the string by spaces, and go over each word, changing it if necessary, and concatenating it to the previous word, and so on.
  It seems pretty naive and I was wondering if there's a better way to do it. I am using .NET 3.5.</p>