StringSegment.AsSpan 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
AsSpan() |
Gets a ReadOnlySpan<T> from the current StringSegment. |
AsSpan(Int32) |
Gets a ReadOnlySpan<T> from the current StringSegment that starts at the position specified by |
AsSpan(Int32, Int32) |
Gets a ReadOnlySpan<T> from the current StringSegment that starts at the position specified by |
AsSpan()
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Gets a ReadOnlySpan<T> from the current StringSegment.
public:
ReadOnlySpan<char> AsSpan();
public ReadOnlySpan<char> AsSpan ();
member this.AsSpan : unit -> ReadOnlySpan<char>
Public Function AsSpan () As ReadOnlySpan(Of Char)
Returns
The ReadOnlySpan<T> from this StringSegment.
Applies to
AsSpan(Int32)
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Gets a ReadOnlySpan<T> from the current StringSegment that starts at the position specified by start
, and has the remaining length.
public:
ReadOnlySpan<char> AsSpan(int start);
public ReadOnlySpan<char> AsSpan (int start);
member this.AsSpan : int -> ReadOnlySpan<char>
Public Function AsSpan (start As Integer) As ReadOnlySpan(Of Char)
Parameters
- start
- Int32
The zero-based starting character position in this StringSegment.
Returns
A ReadOnlySpan<T> with the remaining chars that begins at start
in this StringSegment.
Exceptions
start
is greater than or equal to Length or less than zero.
Applies to
AsSpan(Int32, Int32)
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Gets a ReadOnlySpan<T> from the current StringSegment that starts at the position specified by start
, and has the specified length
.
public:
ReadOnlySpan<char> AsSpan(int start, int length);
public ReadOnlySpan<char> AsSpan (int start, int length);
member this.AsSpan : int * int -> ReadOnlySpan<char>
Public Function AsSpan (start As Integer, length As Integer) As ReadOnlySpan(Of Char)
Parameters
- start
- Int32
The zero-based starting character position in this StringSegment.
- length
- Int32
The number of characters in the span.
Returns
A ReadOnlySpan<T> with length length
that begins at start
in this StringSegment.
Exceptions
start
or length
is less than zero, or start
+ length
is greater than Length.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om