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 個連續字元。

屬性

適用於

另請參閱