Flash Lite 1.x ActionScript 语言参考 |
|
|
|
| Flash Lite 全局函数 > substring() | |||
Flash Lite 1.0。
substring(string,index,count)
string 从中提取新字符串的字符串。
index 要提取的第一个字符的编号。
count 要包含在所提取字符串中的字符的数目,其中不包括 index 处的字符。
函数;提取部分字符串。此函数是从 1 开始的,而 String 类方法是从 0 开始的。
以下示例从字符串"Hello World"中提取前五个字符:
origString = "Hello World!"; newString = substring(origString, 0, 5); trace (newString); // 输出:Hello
|
|
|
|