Actionscript 3:检查字符串是否包含另一个字符串

时间:2012-02-10 14:47:35

标签: actionscript-3

如何检查字符串是否包含flash / Actionscript 3中的另一个字符串?

感谢您的帮助。

1 个答案:

答案 0 :(得分:25)

var a = "hello world";
if(a.indexOf("world") >= 0){
//It contains the String!
}