MemoryExtensions.TrimStart 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
| Name | Description |
|---|---|
| TrimStart(ReadOnlySpan<Char>, Char) |
Removes all leading occurrences of a specified character from the span. |
| TrimStart(ReadOnlySpan<Char>) |
Removes all leading whitespace characters from a read-only span. |
| TrimStart(ReadOnlySpan<Char>, ReadOnlySpan<Char>) |
Removes all leading occurrences of a set of characters specified in a read-only span from the span. |
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(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(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.