Table of Contents

StartsWith Method

Definition

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

StartsWith(string, IEnumerable<string>)

Determines whether the beginning of an instance of string matches at least one string in the specified sequence of strings.

public static bool StartsWith(this string value, IEnumerable<string> startWithValues)

Parameters

value string

The string to extend.

startWithValues IEnumerable<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.

StartsWith(string, StringComparison, IEnumerable<string>)

Determines whether the beginning of an instance of string matches at least one string in the specified sequence of strings.

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

Parameters

value string

The string 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 this string; otherwise, false.

StartsWith(string, params string[])

Determines whether the beginning of an instance of string matches at least one string in the specified sequence of strings.

public static bool StartsWith(this string value, params string[] strings)

Parameters

value string

The string to extend.

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.

StartsWith(string, StringComparison, params string[])

Determines whether the beginning of an instance of string matches at least one string in the specified sequence of strings.

public static bool StartsWith(this string value, StringComparison comparison, params string[] strings)

Parameters

value string

The string 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.