public static List<string> GetWords(string text)
{
var words = new List<string>();
var CurrentWord = new StringBuilder();
foreach (char c in text)
{
if (c == ' ' || c == '\t')
{
if (CurrentWord.ToString() != "")
{
words.Add(CurrentWord.ToString());
CurrentWord = new StringBuilder();
}
words.Add(c.ToString());
}
else
CurrentWord.Append(c.ToString()
);
}
if (CurrentWord.ToString() != "")
words.Add(CurrentWord.ToString());
return words;
}