แก้ไข

แชร์ผ่าน


MemoryExtensions.EndsWith Method

Definition

Overloads

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

Determines whether the end of the span matches the specified value when compared using the specified comparisonType option.

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

Determines whether the specified sequence appears at the end of a read-only span.

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

Determines whether the specified value appears at the end of the span.

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

Determines whether the specified sequence appears at the end of a span.

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

Source:
MemoryExtensions.Globalization.cs
Source:
MemoryExtensions.Globalization.cs
Source:
MemoryExtensions.Globalization.cs

Determines whether the end of the span matches the specified value when compared using the specified comparisonType option.

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

Parameters

span
ReadOnlySpan<Char>

The source span.

value
ReadOnlySpan<Char>

The sequence to compare to the end of the source span.

comparisonType
StringComparison

An enumeration value that determines how span and value are compared.

Returns

true if value matches the end of span; otherwise, false.

Applies to

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Determines whether the specified sequence appears at the end of a read-only span.

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

Type Parameters

T

The type of the span.

Parameters

span
ReadOnlySpan<T>

The source span.

value
ReadOnlySpan<T>

The sequence to compare to the end of the source span.

Returns

true if value matches the end of span; otherwise, false.

Applies to

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

Determines whether the specified value appears at the end of the span.

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

Type Parameters

T

The type of elements in the span.

Parameters

span
ReadOnlySpan<T>

The span to search.

value
T

The value to compare.

Returns

true if value matches the end of span; otherwise, false.

Applies to

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

Determines whether the specified sequence appears at the end of a span.

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

Type Parameters

T

The type of the span.

Parameters

span
Span<T>

The source span.

value
ReadOnlySpan<T>

The sequence to compare to the end of the source span.

Returns

true if value matches the end of span; otherwise, false.

Applies to