StringSegment.StartsWith(String, StringComparison) Method

Definition

Checks if the beginning of this StringSegment matches the specified String when compared using the specified comparisonType.

public bool StartsWith (string text, StringComparison comparisonType);

Parameters

text
String

The Stringto compare.

comparisonType
StringComparison

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

Returns

true if text matches the beginning of this StringSegment; otherwise, false.

Exceptions

text is null.

Applies to

Prodotto Versioni
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)