Actionscript 3:检查字符串是否包含另一个字符串
答
var a = "hello world";
if(a.indexOf("world") >= 0){
//It contains the String!
}
+0
非常感谢;) – Bizboss 2012-02-10 15:12:51
的可能重复[如何确定一个字符串包含特定字符串(http://*.com/questions/2733935/how-to-determine-if-a-string-contains-a-具体子字符串) – 2012-02-10 14:50:51
其实,如果你在google中输入这个问题的标题,那是第一个结果。 – 2012-02-10 14:51:09