MemoryExtensions.TrimStart Method
Definition
Overloads
TrimStart(ReadOnlySpan<Char>, ReadOnlySpan<Char>) |
Removes all leading occurrences of a set of characters specified in a read-only span from the span. |
TrimStart(Span<Char>) |
Removes all leading whitespace characters from a span. |
TrimStart(ReadOnlySpan<Char>, Char) |
Removes all leading occurrences of a specified character from the span. |
TrimStart(ReadOnlyMemory<Char>) |
Removes all leading whitespace characters from a read-only memory region. |
TrimStart(Memory<Char>) |
Removes all leading whitespace characters from a memory region. |
TrimStart(ReadOnlySpan<Char>) |
Removes all leading whitespace characters from a read-only span. |
TrimStart<T>(Span<T>, ReadOnlySpan<T>) |
Removes all leading occurrences of a set of elements specified in a read-only span from the span. |
TrimStart<T>(Memory<T>, ReadOnlySpan<T>) |
Removes all leading occurrences of a set of elements specified in a read-only span from a memory region. |
TrimStart<T>(Memory<T>, T) |
Removes all leading occurrences of a specified element from a memory region. |
TrimStart<T>(ReadOnlyMemory<T>, ReadOnlySpan<T>) |
Removes all leading occurrences of a set of elements specified in a read-only span from a memory region. |
TrimStart<T>(ReadOnlyMemory<T>, T) |
Removes all leading occurrences of a specified element from a memory region. |
TrimStart<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) |
Removes all leading occurrences of a set of elements specified in a read-only span from the span. |
TrimStart<T>(ReadOnlySpan<T>, T) |
Removes all leading occurrences of a specified element from the span. |
TrimStart<T>(Span<T>, T) |
Removes all leading occurrences of a specified element from the span. |
TrimStart(ReadOnlySpan<Char>, ReadOnlySpan<Char>)
Removes all leading occurrences of a set of characters specified in a read-only span from the span.
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<char> TrimStart(ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars);
public static ReadOnlySpan<char> TrimStart (this ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars);
static member TrimStart : ReadOnlySpan<char> * ReadOnlySpan<char> -> ReadOnlySpan<char>
<Extension()>
Public Function TrimStart (span As ReadOnlySpan(Of Char), trimChars As ReadOnlySpan(Of Char)) As ReadOnlySpan(Of Char)
Parameters
- span
- ReadOnlySpan<Char>
The source span from which the characters are removed.
- trimChars
- ReadOnlySpan<Char>
The span which contains the set of characters to remove.
Returns
The trimmed read-only character span.
Remarks
If trimChars
is empty, whitespace characters are removed instead.
Applies to
TrimStart(Span<Char>)
Removes all leading whitespace characters from a span.
public:
[System::Runtime::CompilerServices::Extension]
static Span<char> TrimStart(Span<char> span);
public static Span<char> TrimStart (this Span<char> span);
static member TrimStart : Span<char> -> Span<char>
<Extension()>
Public Function TrimStart (span As Span(Of Char)) As Span(Of Char)
Parameters
Returns
The trimmed character span.
Applies to
TrimStart(ReadOnlySpan<Char>, Char)
Removes all leading occurrences of a specified character from the span.
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<char> TrimStart(ReadOnlySpan<char> span, char trimChar);
public static ReadOnlySpan<char> TrimStart (this ReadOnlySpan<char> span, char trimChar);
static member TrimStart : ReadOnlySpan<char> * char -> ReadOnlySpan<char>
<Extension()>
Public Function TrimStart (span As ReadOnlySpan(Of Char), trimChar As Char) As ReadOnlySpan(Of Char)
Parameters
- span
- ReadOnlySpan<Char>
The source span from which the character is removed.
- trimChar
- Char
The specified character to look for and remove.
Returns
The trimmed read-only character span.
Applies to
TrimStart(ReadOnlyMemory<Char>)
Removes all leading whitespace characters from a read-only memory region.
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlyMemory<char> TrimStart(ReadOnlyMemory<char> memory);
public static ReadOnlyMemory<char> TrimStart (this ReadOnlyMemory<char> memory);
static member TrimStart : ReadOnlyMemory<char> -> ReadOnlyMemory<char>
<Extension()>
Public Function TrimStart (memory As ReadOnlyMemory(Of Char)) As ReadOnlyMemory(Of Char)
Parameters
- memory
- ReadOnlyMemory<Char>
The source memory from which the characters are removed.
Returns
The trimmed read-only character memory region.
Applies to
TrimStart(Memory<Char>)
Removes all leading whitespace characters from a memory region.
public:
[System::Runtime::CompilerServices::Extension]
static Memory<char> TrimStart(Memory<char> memory);
public static Memory<char> TrimStart (this Memory<char> memory);
static member TrimStart : Memory<char> -> Memory<char>
<Extension()>
Public Function TrimStart (memory As Memory(Of Char)) As Memory(Of Char)
Parameters
Returns
The trimmed character memory region.
Applies to
TrimStart(ReadOnlySpan<Char>)
Removes all leading whitespace characters from a read-only span.
public:
[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<char> TrimStart(ReadOnlySpan<char> span);
public static ReadOnlySpan<char> TrimStart (this ReadOnlySpan<char> span);
static member TrimStart : ReadOnlySpan<char> -> ReadOnlySpan<char>
<Extension()>
Public Function TrimStart (span As ReadOnlySpan(Of Char)) As ReadOnlySpan(Of Char)
Parameters
- span
- ReadOnlySpan<Char>
The source span from which the characters are removed.
Returns
The trimmed read-only character span.
Applies to
TrimStart<T>(Span<T>, ReadOnlySpan<T>)
Removes all leading occurrences of a set of elements specified in a read-only span from the span.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Span<T> TrimStart(Span<T> span, ReadOnlySpan<T> trimElements);
public static Span<T> TrimStart<T> (this Span<T> span, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimStart : 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 TrimStart(Of T As IEquatable(Of T)) (span As Span(Of T), trimElements As ReadOnlySpan(Of T)) As Span(Of T)
Type Parameters
- T
The type of the elements in the span.
Parameters
- span
- Span<T>
The source span from which the elements are removed.
- trimElements
- ReadOnlySpan<T>
The span which contains the set of elements to remove.
Returns
The trimmed span.
Remarks
If trimElements
is empty, the span is returned unaltered.
Applies to
TrimStart<T>(Memory<T>, ReadOnlySpan<T>)
Removes all leading occurrences of a set of elements specified in a read-only span from a memory region.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Memory<T> TrimStart(Memory<T> memory, ReadOnlySpan<T> trimElements);
public static Memory<T> TrimStart<T> (this Memory<T> memory, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimStart : 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 TrimStart(Of T As IEquatable(Of T)) (memory As Memory(Of T), trimElements As ReadOnlySpan(Of T)) As Memory(Of T)
Type Parameters
- T
The type of the elements in the memory region.
Parameters
- memory
- Memory<T>
The source memory from which the elements are removed.
- trimElements
- ReadOnlySpan<T>
The span which contains the set of elements to remove.
Returns
The trimmed memory region.
Remarks
If trimElements
is empty, the memory is returned unaltered.
Applies to
TrimStart<T>(Memory<T>, T)
Removes all leading occurrences of a specified element from a memory region.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Memory<T> TrimStart(Memory<T> memory, T trimElement);
public static Memory<T> TrimStart<T> (this Memory<T> memory, T trimElement) where T : IEquatable<T>;
static member TrimStart : Memory<'T (requires 'T :> IEquatable<'T>)> * 'T -> Memory<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimStart(Of T As IEquatable(Of T)) (memory As Memory(Of T), trimElement As T) As Memory(Of T)
Type Parameters
- T
The type of the elements in the memory region.
Parameters
- memory
- Memory<T>
The source memory region from which the element is removed.
- trimElement
- T
The specified element to look for and remove.
Returns
The trimmed memory region.
Applies to
TrimStart<T>(ReadOnlyMemory<T>, ReadOnlySpan<T>)
Removes all leading occurrences of a set of elements specified in a read-only span from a memory region.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlyMemory<T> TrimStart(ReadOnlyMemory<T> memory, ReadOnlySpan<T> trimElements);
public static ReadOnlyMemory<T> TrimStart<T> (this ReadOnlyMemory<T> memory, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimStart : 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 TrimStart(Of T As IEquatable(Of T)) (memory As ReadOnlyMemory(Of T), trimElements As ReadOnlySpan(Of T)) As ReadOnlyMemory(Of T)
Type Parameters
- T
The type of the elements in the read-only memory region.
Parameters
- memory
- ReadOnlyMemory<T>
The source memory from which the elements are removed.
- trimElements
- ReadOnlySpan<T>
The span which contains the set of elements to remove.
Returns
The trimmed read-only memory region.
Remarks
If trimElements
is empty, the memory is returned unaltered.
Applies to
TrimStart<T>(ReadOnlyMemory<T>, T)
Removes all leading occurrences of a specified element from a memory region.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlyMemory<T> TrimStart(ReadOnlyMemory<T> memory, T trimElement);
public static ReadOnlyMemory<T> TrimStart<T> (this ReadOnlyMemory<T> memory, T trimElement) where T : IEquatable<T>;
static member TrimStart : ReadOnlyMemory<'T (requires 'T :> IEquatable<'T>)> * 'T -> ReadOnlyMemory<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimStart(Of T As IEquatable(Of T)) (memory As ReadOnlyMemory(Of T), trimElement As T) As ReadOnlyMemory(Of T)
Type Parameters
- T
The type of the elements in the read-only memory region.
Parameters
- memory
- ReadOnlyMemory<T>
The source memory from which the element is removed.
- trimElement
- T
The specified element to look for and remove.
Returns
The trimmed read-only memory region.
Applies to
TrimStart<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)
Removes all leading occurrences of a set of elements specified in a read-only span from the span.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<T> TrimStart(ReadOnlySpan<T> span, ReadOnlySpan<T> trimElements);
public static ReadOnlySpan<T> TrimStart<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> trimElements) where T : IEquatable<T>;
static member TrimStart : 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 TrimStart(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), trimElements As ReadOnlySpan(Of T)) As ReadOnlySpan(Of T)
Type Parameters
- T
The type of the elements in the read-only span.
Parameters
- span
- ReadOnlySpan<T>
The source span from which the elements are removed.
- trimElements
- ReadOnlySpan<T>
The span which contains the set of elements to remove.
Returns
The trimmed read-only span.
Remarks
If trimElements
is empty, the span is returned unaltered.
Applies to
TrimStart<T>(ReadOnlySpan<T>, T)
Removes all leading occurrences of a specified element from the span.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static ReadOnlySpan<T> TrimStart(ReadOnlySpan<T> span, T trimElement);
public static ReadOnlySpan<T> TrimStart<T> (this ReadOnlySpan<T> span, T trimElement) where T : IEquatable<T>;
static member TrimStart : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * 'T -> ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimStart(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), trimElement As T) As ReadOnlySpan(Of T)
Type Parameters
- T
The type of the elements in the read-only span.
Parameters
- span
- ReadOnlySpan<T>
The source span from which the element is removed.
- trimElement
- T
The specified element to look for and remove.
Returns
The trimmed read-only span.
Applies to
TrimStart<T>(Span<T>, T)
Removes all leading occurrences of a specified element from the span.
public:
generic <typename T>
where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
static Span<T> TrimStart(Span<T> span, T trimElement);
public static Span<T> TrimStart<T> (this Span<T> span, T trimElement) where T : IEquatable<T>;
static member TrimStart : Span<'T (requires 'T :> IEquatable<'T>)> * 'T -> Span<'T (requires 'T :> IEquatable<'T>)> (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function TrimStart(Of T As IEquatable(Of T)) (span As Span(Of T), trimElement As T) As Span(Of T)
Type Parameters
- T
The type of the elements in the span.
Parameters
- span
- Span<T>
The source span from which the element is removed.
- trimElement
- T
The specified element to look for and remove.
Returns
The trimmed span.