My code believe needs to remove unique instancs of the same word (Complete word).
What do I mean by complete words. Well, given the following string:
THIIS IS IS A TEST STRRING
I need this returned:
THIIS IS A TEST STRRING
My code returns this:
THIS IS A TEST STRING
var items = sString.Split(' ');
var uniqueItems = new HashSet<string>(items);
foreach (var item in uniqueItems)
{
strBuilder.Append(item);
strBuilder.Append(" ");
}
finalString = strBuilder.ToString().TrimEnd();
How can i therefore, retain an instance of a duplicate characters within a word, but remove complete duplicate words entirley?