As3把数组转成字符串

【把数组转成字符串】

应用String.join()办法:
[sourcecode language=”plain”]
var myArr:Array = new Array(”one”, “two”, “three”);
var myStr:String = myArr.join(” and “);
trace(myArr); //输出: one,two,three
trace(myStr); //输出: one and two and three
[/sourcecode]
更多特性参见http://www.byywee.com/page/M0/S581/581497.html

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>