人非木

大丈夫处世,不能立功建业,几与草木同腐乎?

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

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/

posted on 2008-10-30 14:41  人非木  阅读(832)  评论(0编辑  收藏  举报

导航