摘要:
(function(){ function getCharlen(s){ return Function('return '+s.split('').map(function(e){return e.charCodeAt(0)<256?1:2}).join("+"))() } console.log(getCharlen('123中文abc'));//10 })(); 阅读全文
posted @ 2017-06-01 15:29
叮了个嘣
阅读(187)
评论(0)
推荐(0)