您的位置:首页 > 其它

通过indexOf()查找某个字符串位置

2008-10-30 14:41 295 查看
AS。的

// 循环直到indexOf()返回-1
while ( ( index = example.indexOf( "cool", index + 1 ) ) != -1 ) {
/* 显示:
String contains word cool at index 30
String contains word cool at index 41
String contains word cool at index 52
*/
trace( "String contains word cool at index " + index );

}

兄弟伙推荐个团购导航

http://www.izhaotuan.com/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: