public static string RemoveLetterString(string str, string delimiter, int nChars) { // string stringValue = CleanUpProductName(str); string stringValue = UserDefinedFunctions.RemoveDuplicateString(str); List <string> stringsList = new List <string>(stringValue.Split(new string[] { delimiter }, StringSplitOptions.RemoveEmptyEntries)); StringBuilder res = new StringBuilder(); foreach (string item in stringsList) { res.Append(item + " "); int i = 0; while (i <= item.Length && (item.Substring(i, Math.Min(i + nChars, item.Length - i))).Length >= nChars) { res.Append(item.Remove(i, nChars) + " "); i++; } } // Result return(res.ToString().Trim()); }