共用方式為


MemoryExtensions.EndsWith 方法

定義

多載

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

使用指定的 comparisonType 選項比較時,判斷 span 結尾是否符合指定的 value

EndsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

判斷指定的序列是否出現在唯讀範圍結尾。

EndsWith<T>(ReadOnlySpan<T>, T)

判斷指定的值是否出現在範圍結尾。

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

判斷指定的序列是否出現在範圍結尾。

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

來源:
MemoryExtensions.Globalization.cs
來源:
MemoryExtensions.Globalization.cs
來源:
MemoryExtensions.Globalization.cs

使用指定的 comparisonType 選項比較時,判斷 span 結尾是否符合指定的 value

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

參數

span
ReadOnlySpan<Char>

來源範圍。

value
ReadOnlySpan<Char>

要與來源範圍結尾比較的序列。

comparisonType
StringComparison

列舉值,決定如何比較 spanvalue

傳回

如果 value 符合 span結尾,true;否則,false

適用於

EndsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

來源:
MemoryExtensions.cs
來源:
MemoryExtensions.cs
來源:
MemoryExtensions.cs

判斷指定的序列是否出現在唯讀範圍結尾。

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

類型參數

T

範圍的類型。

參數

span
ReadOnlySpan<T>

來源範圍。

value
ReadOnlySpan<T>

要與來源範圍結尾比較的序列。

傳回

如果 value 符合 span結尾,true;否則,false

適用於

EndsWith<T>(ReadOnlySpan<T>, T)

判斷指定的值是否出現在範圍結尾。

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

類型參數

T

參數

span
ReadOnlySpan<T>

要搜尋的範圍。

value
T

要比較的值。

傳回

適用於

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

來源:
MemoryExtensions.cs
來源:
MemoryExtensions.cs
來源:
MemoryExtensions.cs

判斷指定的序列是否出現在範圍結尾。

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

類型參數

T

範圍的類型。

參數

span
Span<T>

來源範圍。

value
ReadOnlySpan<T>

要與來源範圍結尾比較的序列。

傳回

如果 value 符合 span結尾,true;否則,false

適用於