Aracılığıyla paylaş


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(System::String ^ text, StringComparison comparisonType);
public bool StartsWith (string text, StringComparison comparisonType);
member this.StartsWith : string * StringComparison -> bool
Public Function StartsWith (text As String, comparisonType As StringComparison) As Boolean

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