Remover - IvanStoychev/IvanStoychev.Useful.String.Extensions GitHub Wiki

This is a list of all methods in the "Remover" class.
The class isn't actually accessible from the NuGet package but it is used to logically separate methods for better organization.


Remove (IEnumerable<string> removeStrings)

Introduced in version 1.0.0


Iterates through all members of removeStrings and replaces any instances in the original string with the empty string, considering case.

Remark: The order of the strings in the enumerable matters, as the method foreaches over them. Thus, if given the string "test dominus" an enumerable of "st", "test" will produce the result "te dominus", while an enumerable of "test", "st" will produce " dominus".


Remove (params string[] removeStrings)

Introduced in version 1.0.0


Iterates through all removeStrings strings and replaces any instances in the original string with the empty string, considering case.
removeStrings is specified with the params keyword to make it easy to call this method with a variable number of strings, like so Remove("one", "two", "three", "four", "and", "etc").

Remark: The order of the strings matters, as the method foreaches over them. Thus, if given the string "test dominus" a parameter of "st", "test" will produce the result "te dominus", while a parameter of "test", "st" will produce " dominus".


Remove (bool ignoreCase, IEnumerable<string> removeStrings)

Introduced in version 1.0.0


Iterates through all members of removeStrings and replaces any instances in the original string with the empty string, considering case if ignoreCase is false.

Remark: The order of the strings in the enumerable matters, as the method foreaches over them. Thus, if given the string "test dominus" an enumerable of "st", "test" will produce the result "te dominus", while an enumerable of "test", "st" will produce " dominus".


Remove (bool ignoreCase, params string[] removeStrings)

Introduced in version 1.0.0


Iterates through all members of removeStrings and replaces any instances in the original string with the empty string, considering case if ignoreCase is false.
removeStrings is specified with the params keyword to make it easy to call this method with a variable number of strings, like so Remove("one", "two", "three", "four", "and", "etc").

Remark: The order of the strings matters, as the method foreaches over them. Thus, if given the string "test dominus" a parameter of "st", "test" will produce the result "te dominus", while a parameter of "test", "st" will produce " dominus".


RemoveNumbers()

Introduced in version 1.0.0


Removes any digit characters from the string. The method uses the \d- regular expression to decide which character is a digit.


RemoveSpecialCharacters()

Introduced in version 1.0.0


Removes any characters that are not a letter or a digit from the string. The method uses the ^0-9A-Za-z+ regular expression to decide which characters to remove.


RemoveLetters()

Introduced in version 1.0.0


Removes any letters from the string. The method uses the A-Za-z regular expression to decide which character is a letter.


TrimStart (string trimString)

Introduced in version 1.0.0


Removes the specified trimString from the start of the current string, case sensetive.


TrimStart (string trimString, StringComparison stringComparison)

Introduced in version 1.0.0


Removes the specified trimString from the start of the current string, using the specified stringComparison options.


TrimStart (string trimString, bool ignoreCase, CultureInfo culture)

Introduced in version 1.0.0


Removes the specified trimString from the start of the current string, considering case if ignoreCase is false and using the specified culture information for string comparison.


TrimEnd (string trimString)

Introduced in version 1.0.0


Removes the specified trimString from the end of the current string, case sensetive.


TrimEnd (string trimString, StringComparison stringComparison)

Introduced in version 1.0.0


Removes the specified trimString from the end of the current string, using the specified stringComparison options.


TrimEnd (string trimString, bool ignoreCase, CultureInfo culture)

Introduced in version 1.0.0


Removes the specified trimString from the end of the current string, considering case if ignoreCase is false and using the specified culture information for string comparison.

⚠️ **GitHub.com Fallback** ⚠️