StringPrototype.substr(Object, Double, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新字串,包含指定字串中指定數量的連續字元,從指定字元位置開始。 如果可以的話,改用 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開始。
- 屬性