Freigeben über


StringSegment Constructors

Definition

Overloads

StringSegment(String)

Initializes an instance of the StringSegment struct.

StringSegment(String, Int32, Int32)

Initializes an instance of the StringSegment struct.

StringSegment(String)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Initializes an instance of the StringSegment struct.

public:
 StringSegment(System::String ^ buffer);
public StringSegment (string? buffer);
new Microsoft.Extensions.Primitives.StringSegment : string -> Microsoft.Extensions.Primitives.StringSegment
Public Sub New (buffer As String)

Parameters

buffer
String

The original String. The StringSegment includes the whole String.

Applies to

StringSegment(String, Int32, Int32)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Initializes an instance of the StringSegment struct.

public:
 StringSegment(System::String ^ buffer, int offset, int length);
public StringSegment (string buffer, int offset, int length);
new Microsoft.Extensions.Primitives.StringSegment : string * int * int -> Microsoft.Extensions.Primitives.StringSegment
Public Sub New (buffer As String, offset As Integer, length As Integer)

Parameters

buffer
String

The original String used as buffer.

offset
Int32

The offset of the segment within the buffer.

length
Int32

The length of the segment.

Exceptions

buffer is null.

offset or length is less than zero, or offset + length is greater than the number of characters in buffer.

Applies to