摘要: function strlen(str) { var len = 0; for (var i = 0; i < str.length; i++) { var c = str.charCodeAt(i); //单字节加1 if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) { len++; } else { len ... 阅读全文
posted @ 2012-11-26 11:29 lhfly 阅读(8167) 评论(0) 推荐(1) 编辑