as3 模拟去掉字符串前后自定字符Trim()方法实现
例如:使用trim去掉字符串头尾的逗号“,”
if(sPhoneLst.length>0) { var first:String=sPhoneLst.charAt(0); var lst:String=sPhoneLst.charAt(sPhoneLst.length-1); if(firs==',') { sPhoneLst= sPhoneLst.substring(1,sPhoneLst.length); } if(lst==',') { sPhoneLst=sPhoneLst.substring(0,sPhoneLst.length-1); } }