StringSegment.Substring 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Substring(Int32) |
从此 StringSegment 检索子字符串。
子字符串从 |
Substring(Int32, Int32) |
从此 StringSegment 检索子字符串。
子字符串从 |
Substring(Int32)
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
从此 StringSegment 检索子字符串。
子字符串从 offset
指定的位置开始,并具有剩余长度。
public:
System::String ^ Substring(int offset);
public string Substring (int offset);
member this.Substring : int -> string
Public Function Substring (offset As Integer) As String
参数
- offset
- Int32
此 StringSegment 中子字符串的起始字符位置(从零开始)。
返回
一个 String ,等效于此 StringSegment中开头offset
的剩余长度的子字符串。
例外
offset
大于或等于 Length,或小于零。
适用于
Substring(Int32, Int32)
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
从此 StringSegment 检索子字符串。
子字符串从 offset
指定的位置开始,并具有指定的 length
。
public:
System::String ^ Substring(int offset, int length);
public string Substring (int offset, int length);
member this.Substring : int * int -> string
Public Function Substring (offset As Integer, length As Integer) As String
参数
- offset
- Int32
此 StringSegment 中子字符串的起始字符位置(从零开始)。
- length
- Int32
子字符串中的字符数。
返回
一个 String ,等效于在此 StringSegment中开始的offset
长度length
子字符串。
例外
offset
或 length
小于零,或 offset
+ length
大于 Length。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈