AS3:截取定长度的字符串
import flash.utils.ByteArray;var title:String = contentXml.title.toString();var char:String = "cn-gb";var fontCount:Number= 10;var byte:ByteArray = new ByteArray();byte.writeMultiByte(title,char);if(byte.length>this.block.fontCount*2){byte.position = 0;title=byte.readMultiByte(fontCount*2,char)+"...";}