StringSegment.Substring 方法
定义
重载
| Substring(Int32) |
从此 StringSegment 检索子字符串。Retrieves a substring from this StringSegment.
子字符串从 |
| Substring(Int32, Int32) |
从此 StringSegment 检索子字符串。Retrieves a substring from this StringSegment.
子字符串从 |
Substring(Int32)
从此 StringSegment 检索子字符串。Retrieves a substring from this StringSegment.
子字符串从 offset 指定的位置开始,并具有剩余长度。The substring starts at the position specified by offset and has the remaining length.
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 中子字符串的起始字符位置(从零开始)。The zero-based starting character position of a substring in this StringSegment.
返回
一个 String,等效于在此 StringSegment 中从 offset 开始的剩余长度的子字符串A String that is equivalent to the substring of remaining length that begins at offset in this StringSegment
例外
适用于
Substring(Int32, Int32)
从此 StringSegment 检索子字符串。Retrieves a substring from this StringSegment.
子字符串从 offset 指定的位置开始,并具有指定的 length。The substring starts at the position specified by offset and has the specified 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 中子字符串的起始字符位置(从零开始)。The zero-based starting character position of a substring in this StringSegment.
- length
- Int32
子字符串中的字符数。The number of characters in the substring.
返回
一个 String,等效于在此 StringSegment 中从 offset 开始的长度为 length 的子字符串A String that is equivalent to the substring of length length that begins at offset in this StringSegment
例外
offset 或 length 小于零,或 offset + length 大于 Length。offset or length is less than zero, or offset + length is greater than Length.