StringSegment.AsSpan Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
AsSpan() |
Obtient un ReadOnlySpan<T> à partir du StringSegment actuel. |
AsSpan(Int32) |
Obtient une ReadOnlySpan<T> valeur à partir du courant StringSegment qui commence à la position spécifiée par |
AsSpan(Int32, Int32) |
Obtient une ReadOnlySpan<T> valeur à partir du courant StringSegment qui commence à la position spécifiée par |
AsSpan()
Obtient un ReadOnlySpan<T> à partir du StringSegment actuel.
public:
ReadOnlySpan<char> AsSpan();
public ReadOnlySpan<char> AsSpan ();
member this.AsSpan : unit -> ReadOnlySpan<char>
Public Function AsSpan () As ReadOnlySpan(Of Char)
Retours
ReadOnlySpan<T> de ce StringSegment.
S’applique à
AsSpan(Int32)
Obtient une ReadOnlySpan<T> valeur à partir du courant StringSegment qui commence à la position spécifiée par start
, et a la longueur restante.
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)
Paramètres
- start
- Int32
Position de caractère de départ de base zéro dans ce StringSegment.
Retours
Avec ReadOnlySpan<T> les caractères restants qui commencent start
dans ce StringSegment.
Exceptions
start
est supérieur ou égal à Length, ou est inférieur à zéro.
S’applique à
AsSpan(Int32, Int32)
Obtient une ReadOnlySpan<T> valeur à partir du courant StringSegment qui commence à la position spécifiée par start
, et a la valeur spécifiée 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)
Paramètres
- start
- Int32
Position de caractère de départ de base zéro dans ce StringSegment.
- length
- Int32
Nombre de caractères dans l’étendue.
Retours
Une ReadOnlySpan<T> longueur length
qui commence start
dans ce StringSegment.
Exceptions
start
ou length
est inférieur à zéro, ou start
+ length
est supérieur à Length.