StringSegment.Subsegment Método

Definição

Sobrecargas

Subsegment(Int32)

Recupera uma StringSegment que representa uma substring desta StringSegment.Retrieves a StringSegment that represents a substring from this StringSegment. O StringSegment começa na posição especificada por offset.The StringSegment starts at the position specified by offset.

Subsegment(Int32, Int32)

Recupera uma StringSegment que representa uma substring desta StringSegment.Retrieves a StringSegment that represents a substring from this StringSegment. O StringSegment começa na posição especificada por offset e tem o length especificado.The StringSegment starts at the position specified by offset and has the specified length.

Subsegment(Int32)

Recupera uma StringSegment que representa uma substring desta StringSegment.Retrieves a StringSegment that represents a substring from this StringSegment. O StringSegment começa na posição especificada por offset.The StringSegment starts at the position specified by offset.

public:
 Microsoft::Extensions::Primitives::StringSegment Subsegment(int offset);
public Microsoft.Extensions.Primitives.StringSegment Subsegment (int offset);
member this.Subsegment : int -> Microsoft.Extensions.Primitives.StringSegment
Public Function Subsegment (offset As Integer) As StringSegment

Parâmetros

offset
Int32

A posição de caractere de início de base zero de uma substring nesta StringSegment.The zero-based starting character position of a substring in this StringSegment.

Retornos

StringSegment

Um StringSegment que começa em offset neste StringSegment cujo comprimento é o resto.A StringSegment that begins at offset in this StringSegment whose length is the remainder.

Exceções

offset é maior ou igual a Length ou menor que zero.offset is greater than or equal to Length or less than zero.

Aplica-se a

Subsegment(Int32, Int32)

Recupera uma StringSegment que representa uma substring desta StringSegment.Retrieves a StringSegment that represents a substring from this StringSegment. O StringSegment começa na posição especificada por offset e tem o length especificado.The StringSegment starts at the position specified by offset and has the specified length.

public:
 Microsoft::Extensions::Primitives::StringSegment Subsegment(int offset, int length);
public Microsoft.Extensions.Primitives.StringSegment Subsegment (int offset, int length);
member this.Subsegment : int * int -> Microsoft.Extensions.Primitives.StringSegment
Public Function Subsegment (offset As Integer, length As Integer) As StringSegment

Parâmetros

offset
Int32

A posição de caractere de início de base zero de uma substring nesta StringSegment.The zero-based starting character position of a substring in this StringSegment.

length
Int32

O número de caracteres na subcadeia de caracteres.The number of characters in the substring.

Retornos

StringSegment

Um StringSegment que é equivalente à substring de comprimento length que começa em offset neste StringSegmentA StringSegment that is equivalent to the substring of length length that begins at offset in this StringSegment

Exceções

offset ou length é menor que zero ou offset + length é maior que Length.offset or length is less than zero, or offset + length is greater than Length.

Aplica-se a