RemoveAll Method
Definition
RemoveAll(string, params string[])
Returns a new string in which all the specified fragments has been removed from the specified value.
public static string RemoveAll(string value, params string[] fragments)
Parameters
valuestringThe string value to perform the sweep on.
fragmentsstring[]The fragments containing the characters and/or words to delete.
Returns
- string
A new string that is equivalent to
valueexcept for the removed characters and/or words.
Remarks
This method performs an ordinal (case-sensitive and culture-insensitive) comparison. The search begins at the first character position of this string and continues through the last character position.
RemoveAll(string, StringComparison, params string[])
Returns a new string in which all the specified fragments has been deleted from the specified value.
public static string RemoveAll(string value, StringComparison comparison, params string[] fragments)
Parameters
valuestringThe string value to perform the sweep on.
comparisonStringComparisonOne of the enumeration values that specifies the rules to use in the comparison.
fragmentsstring[]The fragments containing the characters and/or words to delete.
Returns
- string
A new string that is equivalent to
valueexcept for the removed characters and/or words.
RemoveAll(string, params char[])
Returns a new string in which all the specified fragments has been deleted from the specified value.
public static string RemoveAll(string value, params char[] fragments)
Parameters
valuestringThe string value to perform the sweep on.
fragmentschar[]The fragments containing the characters and/or words to delete.
Returns
- string
A new string that is equivalent to
valueexcept for the removed characters.
RemoveAll(string[], params string[])
Returns a new string array in which all the specified fragments has been deleted from the specified source array.
public static string[] RemoveAll(string[] source, params string[] fragments)
Parameters
sourcestring[]The string array value to perform the sweep on.
fragmentsstring[]The fragments containing the characters and/or words to delete.
Returns
- string[]
A new string array that is equivalent to
sourceexcept for the removed characters and/or words.
Remarks
This method performs an ordinal (case-sensitive and culture-insensitive) comparison. The search begins at the first character position of this string and continues through the last character position.
RemoveAll(string[], StringComparison, params string[])
Returns a new string array in which all the specified fragments has been deleted from the specified source array.
public static string[] RemoveAll(string[] source, StringComparison comparison, params string[] fragments)
Parameters
sourcestring[]The string array value to perform the sweep on.
comparisonStringComparisonOne of the enumeration values that specifies the rules to use in the comparison.
fragmentsstring[]The fragments containing the characters and/or words to delete.
Returns
- string[]
A new string array that is equivalent to
sourceexcept for the removed characters and/or words.