解决方法
var str1:String = "Vinoth"; var str2:String = "Babu"; var str3:String = "Chennai"; var str4:String = concat(str1," ",str2,str3)
trace(str4)会导致你
str4 ==“Vinoth babu Chennai”
字符串Concat类
public class StringBuffer { public var buffer:Array = new Array(); public function add(str:String):void { for (var i:Number = 0; i < str.length; i++) { buffer.push(str.charCodeAt(i)); } } public function toString():String { return String.fromCharCode.apply(this,buffer); } }
在这里,你比上面写的更深刻.
http://blogs.adobe.com/pfarland/2007/10/avoiding_string_concatenation.html