摘要: //正则:用于区分中文为两个字节function getLength(str){ return String(str).replace(/[^\x00-\xff]/g,'aa').length;} 输入: abc:返回3 测试:返回4 阅读全文
posted @ 2016-03-11 10:47 缤纷世界 阅读(562) 评论(0) 推荐(0) 编辑