MemoryExtensions.EndsWith Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
EndsWith(ReadOnlySpan<Char>, ReadOnlySpan<Char>, StringComparison) |
Determines whether the end of the |
EndsWith<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) |
Determines whether the specified sequence appears at the end of a read-only 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)
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>(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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기