StringExtensions.RemoveDoubleCharacter Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

RemoveDoubleCharacter(String, Char)

Removes any double instances of the specified character. So "--" becomes "-" if the character is '-'.

public static string RemoveDoubleCharacter(this string text, char character)

Parameters

text
System.String
character
System.Char

Returns

System.String

A string with duplicate characters removed.