RemoveAll Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
RemoveAll(string, params string[])
Returns a new string in which all the specified filter values has been deleted from the specified value.
public static string RemoveAll(this string value, params string[] filter)
Parameters
valuestringThe string to extend.
filterstring[]The filter 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.
Exceptions
- ArgumentNullException
valueis null orfilteris null.
RemoveAll(string, StringComparison, params string[])
Returns a new string in which all the specified filter values has been deleted from the specified value.
public static string RemoveAll(this string value, StringComparison comparison, params string[] filter)
Parameters
valuestringThe string to extend.
comparisonStringComparisonOne of the enumeration values that specifies the rules to use in the comparison.
filterstring[]The filter 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.
Exceptions
- ArgumentNullException
valueis null orfilteris null.
RemoveAll(string[], params string[])
Returns a new string array in which all the specified filter values has been deleted from the specified source array.
public static string[] RemoveAll(this string[] source, params string[] filter)
Parameters
sourcestring[]The string sequence to extend.
filterstring[]The filter 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.
Exceptions
- ArgumentNullException
sourceis null orfilteris null.
RemoveAll(string[], StringComparison, params string[])
Returns a new string array in which all the specified filter values has been deleted from the specified source array.
public static string[] RemoveAll(this string[] source, StringComparison comparison, params string[] filter)
Parameters
sourcestring[]The string sequence to extend.
comparisonStringComparisonOne of the enumeration values that specifies the rules to use in the comparison.
filterstring[]The filter 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.
Exceptions
- ArgumentNullException
sourceis null orfilteris null.
RemoveAll(string, params char[])
Returns a new string in which all the specified filter values has been deleted from the specified value.
public static string RemoveAll(this string value, params char[] filter)
Parameters
valuestringThe string to extend.
filterchar[]The filter containing the characters and/or words to delete.
Returns
- string
A new string that is equivalent to
valueexcept for the removed characters.