MemoryExtensions.TrimEnd 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
TrimEnd(ReadOnlySpan<Char>, Char) |
从只读范围中删除指定字符的所有尾随匹配项。 |
TrimEnd(Memory<Char>) |
从字符内存区域中删除所有尾随空格字符。 |
TrimEnd(ReadOnlyMemory<Char>) |
从只读字符内存区域中删除所有尾随空格字符。 |
TrimEnd(ReadOnlySpan<Char>) |
从只读字符范围中删除所有尾随空格字符。 |
TrimEnd(Span<Char>) |
从字符范围中删除所有尾随空格字符。 |
TrimEnd(ReadOnlySpan<Char>, ReadOnlySpan<Char>) |
从只读字符范围中删除在只读范围中指定的一组字符的所有尾随匹配项。 |
TrimEnd<T>(Memory<T>, T) |
从字符内存区域中删除指定元素的所有尾随匹配项。 |
TrimEnd<T>(Span<T>, ReadOnlySpan<T>) |
从范围中移除在只读跨度中指定的一组元素的所有尾随匹配项。 |
TrimEnd<T>(Span<T>, T) |
从范围中删除指定元素的所有尾随匹配项。 |
TrimEnd<T>(ReadOnlySpan<T>, T) |
从只读范围中删除指定元素的所有尾随匹配项。 |
TrimEnd<T>(Memory<T>, ReadOnlySpan<T>) |
从内存区域中删除在只读跨度中指定的一组元素的所有尾随匹配项。 |
TrimEnd<T>(ReadOnlyMemory<T>, T) |
从只读内存区域中删除指定元素的所有尾随匹配项。 |
TrimEnd<T>(ReadOnlyMemory<T>, ReadOnlySpan<T>) |
从只读内存区域中删除在只读跨度中指定的一组元素的所有尾随匹配项。 |
TrimEnd<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) |
从只读范围中删除在只读范围中指定的一组元素的所有尾随匹配项。 |
TrimEnd(ReadOnlySpan<Char>, Char)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读范围中删除指定字符的所有尾随匹配项。
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<char> TrimEnd(ReadOnlySpan<char> span, char trimChar);
public static ReadOnlySpan<char> TrimEnd (this ReadOnlySpan<char> span, char trimChar);
static member TrimEnd : ReadOnlySpan<char> * char -> ReadOnlySpan<char>
<Extension()>
Public Function TrimEnd (span As ReadOnlySpan(Of Char), trimChar As Char) As ReadOnlySpan(Of Char)
参数
- span
- ReadOnlySpan<Char>
从中删除字符的源范围。
- trimChar
- Char
要查找和删除的指定字符。
返回
剪裁的只读字符范围。
适用于
TrimEnd(Memory<Char>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从字符内存区域中删除所有尾随空格字符。
public:
[System::Runtime::CompilerServices::Extension]
static Memory<char> TrimEnd(Memory<char> memory);
public static Memory<char> TrimEnd (this Memory<char> memory);
static member TrimEnd : Memory<char> -> Memory<char>
<Extension()>
Public Function TrimEnd (memory As Memory(Of Char)) As Memory(Of Char)
参数
返回
剪裁的字符内存区域。
适用于
TrimEnd(ReadOnlyMemory<Char>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读字符内存区域中删除所有尾随空格字符。
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlyMemory<char> TrimEnd(ReadOnlyMemory<char> memory);
public static ReadOnlyMemory<char> TrimEnd (this ReadOnlyMemory<char> memory);
static member TrimEnd : ReadOnlyMemory<char> -> ReadOnlyMemory<char>
<Extension()>
Public Function TrimEnd (memory As ReadOnlyMemory(Of Char)) As ReadOnlyMemory(Of Char)
参数
- memory
- ReadOnlyMemory<Char>
从中删除字符的源内存。
返回
剪裁的只读字符范围。
适用于
TrimEnd(ReadOnlySpan<Char>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读字符范围中删除所有尾随空格字符。
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<char> TrimEnd(ReadOnlySpan<char> span);
public static ReadOnlySpan<char> TrimEnd (this ReadOnlySpan<char> span);
static member TrimEnd : ReadOnlySpan<char> -> ReadOnlySpan<char>
<Extension()>
Public Function TrimEnd (span As ReadOnlySpan(Of Char)) As ReadOnlySpan(Of Char)
参数
- span
- ReadOnlySpan<Char>
从中删除字符的源范围。
返回
剪裁的只读字符范围。
适用于
TrimEnd(Span<Char>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从字符范围中删除所有尾随空格字符。
public:
[System::Runtime::CompilerServices::Extension]
static Span<char> TrimEnd(Span<char> span);
public static Span<char> TrimEnd (this Span<char> span);
static member TrimEnd : Span<char> -> Span<char>
<Extension()>
Public Function TrimEnd (span As Span(Of Char)) As Span(Of Char)
参数
返回
剪裁的字符范围。
适用于
TrimEnd(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读字符范围中删除在只读范围中指定的一组字符的所有尾随匹配项。
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<char> TrimEnd(ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars);
public static ReadOnlySpan<char> TrimEnd (this ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars);
static member TrimEnd : ReadOnlySpan<char> * ReadOnlySpan<char> -> ReadOnlySpan<char>
<Extension()>
Public Function TrimEnd (span As ReadOnlySpan(Of Char), trimChars As ReadOnlySpan(Of Char)) As ReadOnlySpan(Of Char)
参数
- span
- ReadOnlySpan<Char>
从中删除字符的源范围。
- trimChars
- ReadOnlySpan<Char>
包含要删除的字符集的范围。
返回
剪裁的只读字符范围。
注解
如果 trimChars
为空,则会删除空格字符。
适用于
TrimEnd<T>(Memory<T>, T)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从字符内存区域中删除指定元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Memory<T> TrimEnd(Memory<T> memory, T trimElement);
public static Memory<T> TrimEnd<T> (this Memory<T> memory, T trimElement) where T : IEquatable<T>;
static member TrimEnd : Memory<'T (requires 'T :> IEquatable<'T>)> * 'T -> Memory<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (memory As Memory(Of T), trimElement As T) As Memory(Of T)
类型参数
- T
内存区域中元素的类型。
参数
- memory
- Memory<T>
从中删除元素的源内存。
- trimElement
- T
要查找和删除的指定元素。
返回
剪裁的内存区域。
适用于
TrimEnd<T>(Span<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从范围中移除在只读跨度中指定的一组元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Span<T> TrimEnd(Span<T> span, ReadOnlySpan<T> trimElements);
public static Span<T> TrimEnd<T> (this Span<T> span, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimEnd : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> Span<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (span As Span(Of T), trimElements As ReadOnlySpan(Of T)) As Span(Of T)
类型参数
- T
范围中元素的类型。
参数
- span
- Span<T>
从中删除元素的源范围。
- trimElements
- ReadOnlySpan<T>
包含要移除的元素集的跨度。
返回
剪裁的跨度。
注解
如果 trimElements
为空,则不更改范围。
适用于
TrimEnd<T>(Span<T>, T)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从范围中删除指定元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Span<T> TrimEnd(Span<T> span, T trimElement);
public static Span<T> TrimEnd<T> (this Span<T> span, T trimElement) where T : IEquatable<T>;
static member TrimEnd : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> Span<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (span As Span(Of T), trimElement As T) As Span(Of T)
类型参数
- T
范围中元素的类型。
参数
- span
- Span<T>
从中删除元素的源范围。
- trimElement
- T
要查找和删除的指定元素。
返回
剪裁的跨度。
适用于
TrimEnd<T>(ReadOnlySpan<T>, T)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读范围中删除指定元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<T> TrimEnd(ReadOnlySpan<T> span, T trimElement);
public static ReadOnlySpan<T> TrimEnd<T> (this ReadOnlySpan<T> span, T trimElement) where T : IEquatable<T>;
static member TrimEnd : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T -> ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), trimElement As T) As ReadOnlySpan(Of T)
类型参数
- T
只读范围中的元素的类型。
参数
- span
- ReadOnlySpan<T>
从中删除元素的源范围。
- trimElement
- T
要查找和删除的指定元素。
返回
剪裁的只读范围。
适用于
TrimEnd<T>(Memory<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从内存区域中删除在只读跨度中指定的一组元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Memory<T> TrimEnd(Memory<T> memory, ReadOnlySpan<T> trimElements);
public static Memory<T> TrimEnd<T> (this Memory<T> memory, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimEnd : Memory<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> Memory<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (memory As Memory(Of T), trimElements As ReadOnlySpan(Of T)) As Memory(Of T)
类型参数
- T
内存区域中元素的类型。
参数
- memory
- Memory<T>
从中删除元素的源内存。
- trimElements
- ReadOnlySpan<T>
包含要移除的元素集的跨度。
返回
剪裁的内存区域。
注解
如果 trimElements
为空,则不更改返回内存。
适用于
TrimEnd<T>(ReadOnlyMemory<T>, T)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读内存区域中删除指定元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlyMemory<T> TrimEnd(ReadOnlyMemory<T> memory, T trimElement);
public static ReadOnlyMemory<T> TrimEnd<T> (this ReadOnlyMemory<T> memory, T trimElement) where T : IEquatable<T>;
static member TrimEnd : ReadOnlyMemory<'T (requires 'T :> IEquatable<'T>)> * 'T -> ReadOnlyMemory<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (memory As ReadOnlyMemory(Of T), trimElement As T) As ReadOnlyMemory(Of T)
类型参数
- T
只读内存区域中元素的类型。
参数
- memory
- ReadOnlyMemory<T>
从中删除元素的源内存。
- trimElement
- T
要查找和删除的指定元素。
返回
剪裁的只读内存区域。
适用于
TrimEnd<T>(ReadOnlyMemory<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读内存区域中删除在只读跨度中指定的一组元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlyMemory<T> TrimEnd(ReadOnlyMemory<T> memory, ReadOnlySpan<T> trimElements);
public static ReadOnlyMemory<T> TrimEnd<T> (this ReadOnlyMemory<T> memory, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimEnd : ReadOnlyMemory<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> ReadOnlyMemory<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (memory As ReadOnlyMemory(Of T), trimElements As ReadOnlySpan(Of T)) As ReadOnlyMemory(Of T)
类型参数
- T
只读内存区域中元素的类型。
参数
- memory
- ReadOnlyMemory<T>
从中删除元素的源内存。
- trimElements
- ReadOnlySpan<T>
包含要移除的元素集的跨度。
返回
剪裁的只读内存区域。
注解
如果 trimElements
为空,则不更改返回内存。
适用于
TrimEnd<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
- Source:
- MemoryExtensions.Trim.cs
从只读范围中删除在只读范围中指定的一组元素的所有尾随匹配项。
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<T> TrimEnd(ReadOnlySpan<T> span, ReadOnlySpan<T> trimElements);
public static ReadOnlySpan<T> TrimEnd<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimEnd : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimEnd(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), trimElements As ReadOnlySpan(Of T)) As ReadOnlySpan(Of T)
类型参数
- T
只读范围中的元素的类型。
参数
- span
- ReadOnlySpan<T>
从中删除元素的源范围。
- trimElements
- ReadOnlySpan<T>
包含要移除的元素集的跨度。
返回
剪裁的只读范围。
注解
如果 trimElements
为空,则不更改范围。