1
获取字符串的长度
http://www.nowcoder.com/questionTerminal/e436bbc408744b73b69a8925fac26efc
function strLength(s, bUnicode255For1) {
var length=s.length;
if(!bUnicode255For1){
for( var i in s){
if(s.charCodeAt(i)>255) {
length++;
}
}
}
return length;
}
