substring 函数

substring("string", index, count) : String

自 Flash Player 5 后不推荐使用。不推荐使用此函数,而推荐使用 String.substr()

提取部分字符串。此函数是从 1 开始的,而 String 对象方法是从 0 开始的。

参数

string:String ― 从中提取新字符串的字符串。

index:Number ― 要提取的第一个字符的编号。

count:Number ― 要在已提取的字符串中包括的字符数,不包括索引字符。

返回

String ― 已提取的子字符串。

请参阅

substr(String.substr 方法)