StringPrototype.substr(Object, Double, Object) 方法

定义

创建一个新字符串,该字符串包含指定字符串中从指定字符位置开始的指定连续字符数。 如果可以,请改用 substring(Object, Double, Object)

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static System::String ^ substr(System::Object ^ thisob, double start, System::Object ^ count);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.String_substr)]
[Microsoft.JScript.NotRecommended("substr")]
public static string substr(object thisob, double start, object count);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.String_substr)>]
[<Microsoft.JScript.NotRecommended("substr")>]
static member substr : obj * double * obj -> string
Public Shared Function substr (thisob As Object, start As Double, count As Object) As String

参数

thisob
Object

此方法所依据的对象。

start
Double

要获取的第一个连续字符。

count
Object

要获取的字符数。

返回

包含连续字符的新字符串count,从 .start

属性

适用于

另请参阅