MemoryExtensions.StartsWith MemoryExtensions.StartsWith MemoryExtensions.StartsWith MemoryExtensions.StartsWith Method

定義

オーバーロード

StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison)

指定された StringComparison 値を使用して比較したときに、読み取り専用の文字スパンが指定された値で始まるかどうかを判断します。Determines whether a read-only character span begins with a specified value when compared using a specified StringComparison value.

StartsWith<T>(Span<T>, ReadOnlySpan<T>) StartsWith<T>(Span<T>, ReadOnlySpan<T>) StartsWith<T>(Span<T>, ReadOnlySpan<T>) StartsWith<T>(Span<T>, ReadOnlySpan<T>)

指定されたシーケンスがスパンの先頭にあるかどうかを判断します。Determines whether a specified sequence appears at the start of a span.

StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

指定されたシーケンスが読み取り専用スパンの先頭にあるかどうかを判断します。Determines whether a specified sequence appears at the start of a read-only span.

StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) StartsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison)

指定された StringComparison 値を使用して比較したときに、読み取り専用の文字スパンが指定された値で始まるかどうかを判断します。Determines whether a read-only character span begins with a specified value when compared using a specified StringComparison value.

public:
[System::Runtime::CompilerServices::Extension]
 static bool StartsWith(ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType);
public static bool StartsWith (this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType);
static member StartsWith : ReadOnlySpan<char> * ReadOnlySpan<char> * StringComparison -> bool
<Extension()>
Public Function StartsWith (span As ReadOnlySpan(Of Char), value As ReadOnlySpan(Of Char), comparisonType As StringComparison) As Boolean

パラメーター

span
ReadOnlySpan<Char>

ソース スパン。The source span.

value
ReadOnlySpan<Char>

ソース スパンの先頭と比較するシーケンス。The sequence to compare to the beginning of the source span.

comparisonType
StringComparison StringComparison StringComparison StringComparison

spanvalue の比較方法を決定する列挙型の値。An enumeration value that determines how span and value are compared.

戻り値

valuespan の先頭と一致する場合は true。それ以外の場合は falsetrue if value matches the beginning of span; otherwise, false.

StartsWith<T>(Span<T>, ReadOnlySpan<T>) StartsWith<T>(Span<T>, ReadOnlySpan<T>) StartsWith<T>(Span<T>, ReadOnlySpan<T>) StartsWith<T>(Span<T>, ReadOnlySpan<T>)

指定されたシーケンスがスパンの先頭にあるかどうかを判断します。Determines whether a specified sequence appears at the start of a span.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static bool StartsWith(Span<T> span, ReadOnlySpan<T> value);
public static bool StartsWith<T> (this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>;
static member StartsWith : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function StartsWith(Of T As IEquatable(Of T)) (span As Span(Of T), value As ReadOnlySpan(Of T)) As Boolean

型パラメーター

T

スパン内の要素の型。The type of the elements in the span.

パラメーター

span
Span<T> Span<T> Span<T> Span<T>

検索するスパン。The span to search.

value
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

span の先頭で検索するシーケンス。A sequence to search for at the start of span.

戻り値

valuespan の先頭と一致する場合は true。それ以外の場合は falsetrue if value matches the beginning of span; otherwise, false.

StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) StartsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

指定されたシーケンスが読み取り専用スパンの先頭にあるかどうかを判断します。Determines whether a specified sequence appears at the start of a read-only span.

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static bool StartsWith(ReadOnlySpan<T> span, ReadOnlySpan<T> value);
public static bool StartsWith<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> value) where T : IEquatable<T>;
static member StartsWith : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function StartsWith(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), value As ReadOnlySpan(Of T)) As Boolean

型パラメーター

T

スパン内の要素の型。The type of elements in the span.

パラメーター

span
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

検索する読み取り専用の文字スパン。The read-only character span to search.

value
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

span の先頭で検索するシーケンス。A sequence to search for at the start of span.

戻り値

valuespan の先頭と一致する場合は true。それ以外の場合は falsetrue if value matches the beginning of span; otherwise, false.

適用対象