OpenTypeMethods.Substring 方法

定义

使用指定的起始索引返回子字符串。

重载

Substring(Object, Object)

返回指定的起始索引位置以后的子字符串。

Substring(Object, Object, Object)

返回指定的起始索引位置后特定长度的子字符串。

Substring(Object, Object)

返回指定的起始索引位置以后的子字符串。

public:
 static System::Object ^ Substring(System::Object ^ targetString, System::Object ^ startIndex);
public static object Substring (object targetString, object startIndex);
static member Substring : obj * obj -> obj
Public Shared Function Substring (targetString As Object, startIndex As Object) As Object

参数

targetString
Object

要从中返回子字符串的字符串。

startIndex
Object

子字符串的起始索引。

返回

子字符串。

注解

Substring 方法返回 startIndex 中从 targetString 位置到末尾的所有字符。

适用于

Substring(Object, Object, Object)

返回指定的起始索引位置后特定长度的子字符串。

public:
 static System::Object ^ Substring(System::Object ^ targetString, System::Object ^ startIndex, System::Object ^ length);
public static object Substring (object targetString, object startIndex, object length);
static member Substring : obj * obj * obj -> obj
Public Shared Function Substring (targetString As Object, startIndex As Object, length As Object) As Object

参数

targetString
Object

要从中返回子字符串的字符串。

startIndex
Object

子字符串的起始索引。

length
Object

子字符串的长度。

返回

子字符串。

注解

Substring 方法返回 length 中从 startIndex 位置到末尾的 targetString 个字符。

适用于