StringSegment Constructors
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
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);
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
- 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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應