标签:++ length ret val += else lse pre char
function gblen(val) {
var len = 0;
for (var i = 0; i < val.length; i++) {
if (val.charCodeAt(i) > 127 || val.charCodeAt(i) == 94) {
len += 2;
} else {
len++;
}
}
return len;
}
标签:++ length ret val += else lse pre char
原文地址:https://www.cnblogs.com/hyx626/p/10364104.html