Table of Contents

ContainsAny Method

Definition

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

ContainsAny(IDecorator<string>, StringComparison, params char[])

Returns a value indicating whether the specified values occurs within the enclosed string of the specified decorator object.

public static bool ContainsAny(this IDecorator<string> decorator, StringComparison comparison, params char[] values)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

comparison StringComparison

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

values char[]

The char sequence to search within the enclosed string of the specified decorator.

Returns

bool

true if the values parameter occurs within the enclosed string of the specified decorator; otherwise, false.

Exceptions

ArgumentNullException

decorator is null -or- values is null.

ContainsAny(IDecorator<string>, char, StringComparison)

Returns a value indicating whether the specified find occurs within the enclosed string of the specified decorator.

public static bool ContainsAny(this IDecorator<string> decorator, char find, StringComparison comparison = StringComparison.OrdinalIgnoreCase)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

find char

The char to search within enclosed string of the specified decorator.

comparison StringComparison

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

Returns

bool

true if the find parameter occurs within the enclosed string of the specified decorator; otherwise, false.

Exceptions

ArgumentNullException

decorator is null -or- find is null.