StartsWith Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
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
valuestringThe string to extend.
startWithValuesIEnumerable<string>A sequence of string values to match against.
Returns
- bool
trueif 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
valuestringThe string to extend.
comparisonStringComparisonOne of the enumeration values that specifies the rules to use in the comparison.
stringsIEnumerable<string>A sequence of string values to match against.
Returns
- bool
trueif 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
Returns
- bool
trueif 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
valuestringThe string to extend.
comparisonStringComparisonOne of the enumeration values that specifies the rules to use in the comparison.
stringsstring[]A sequence of string values to match against.
Returns
- bool
trueif at least one value matches the beginning of this string; otherwise,false.
Remarks
This match is performed by using a default value of OrdinalIgnoreCase.