Table of Contents

StartsWith Method

Definition

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

StartsWith(IDecorator<string>, IEnumerable<string>)

Determines whether the beginning of the enclosed string of the specified decorator matches at least one string in the specified sequence of strings.

public static bool StartsWith(this IDecorator<string> decorator, IEnumerable<string> strings)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

strings IEnumerable<string>

A sequence of string values to match against.

Returns

bool

true if at least one value matches the beginning of the enclosed string of the specified decorator; otherwise, false.

Remarks

This match is performed by using a default value of OrdinalIgnoreCase.

StartsWith(IDecorator<string>, StringComparison, IEnumerable<string>)

Determines whether the beginning of the enclosed string of the specified decorator matches at least one string in the specified sequence of strings.

public static bool StartsWith(this IDecorator<string> decorator, StringComparison comparison, IEnumerable<string> strings)

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.

strings IEnumerable<string>

A sequence of string values to match against.

Returns

bool

true if at least one value matches the beginning of the enclosed string of the specified decorator; otherwise, false.

StartsWith(IDecorator<string>, params string[])

Determines whether the beginning of the enclosed string of the specified decorator matches at least one string in the specified sequence of strings.

public static bool StartsWith(this IDecorator<string> decorator, params string[] strings)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

strings string[]

A sequence of string values to match against.

Returns

bool

true if at least one value matches the beginning of the enclosed string of the specified decorator; otherwise, false.

Remarks

This match is performed by using a default value of OrdinalIgnoreCase.

StartsWith(IDecorator<string>, StringComparison, params string[])

Determines whether the beginning of the enclosed string of the specified decorator matches at least one string in the specified sequence of strings.

public static bool StartsWith(this IDecorator<string> decorator, StringComparison comparison, params string[] strings)

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.

strings string[]

A sequence of string values to match against.

Returns

bool

true if at least one value matches the beginning of this string; otherwise, false.

Remarks

This match is performed by using a default value of OrdinalIgnoreCase.