Table of Contents

RemoveAll Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/StringExtensions.cs

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

value string

The string to extend.

filter string[]

The filter containing the characters and/or words to delete.

Returns

string

A new string that is equivalent to value except 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

value is null or filter is 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

value string

The string to extend.

comparison StringComparison

One of the enumeration values that specifies the rules to use in the comparison.

filter string[]

The filter containing the characters and/or words to delete.

Returns

string

A new string that is equivalent to value except for the removed characters and/or words.

Exceptions

ArgumentNullException

value is null or filter is 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

source string[]

The string sequence to extend.

filter string[]

The filter containing the characters and/or words to delete.

Returns

string[]

A new string array that is equivalent to source except 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

source is null or filter is 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

source string[]

The string sequence to extend.

comparison StringComparison

One of the enumeration values that specifies the rules to use in the comparison.

filter string[]

The filter containing the characters and/or words to delete.

Returns

string[]

A new string array that is equivalent to source except for the removed characters and/or words.

Exceptions

ArgumentNullException

source is null or filter is 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

value string

The string to extend.

filter char[]

The filter containing the characters and/or words to delete.

Returns

string

A new string that is equivalent to value except for the removed characters.