using System;
using System.Collections.Generic;
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
//Words that will not be capitalized; add words to this list as required
string[] exceptionsArray = { "a", "an", "and", "any", "at", "from", "into", "of", "on", "or", "the", "to", };
List<string> exceptions = new List<string>(exceptionsArray);
//Break the input text into a list of capitalized (not upper case) words
text = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(text.ToLower());
List<string> words = new List<string>(text.Split(new char[] { ' ' }));
//Always leave the first word capitalized, regardless of what it is
text = words[0];
words.RemoveAt(0);
//Check each remaining word against the list, and append it to the new text
foreach (string s in words)
{
if (exceptions.Contains(s.ToLower()))
text += " " + s.ToLower();
else
text += " " + s;
}
return text;
}
}