摘要: 应用:计算字符串的长度(一个双字节字符长度计2,ASCII字符计1) String.prototype.len=function(){return this.replace(/[^\x00-\xff]/g,"aa").length;} 阅读全文
posted @ 2018-02-22 16:45 灏月天染 阅读(352) 评论(0) 推荐(0) 编辑