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
string

The text with characters to remove.

character
char

The character to remove.

Returns

string

A string with duplicate characters removed.