functionstrlen(str){let temp =0;for(let i =0; i < str.length; i++){if(str.charCodeAt(i)>127|| str.charCodeAt(i)==94){
temp +=2;}else{
temp++;}}return temp ;};
functionstrlen(str){let temp =0;for(let i =0; i < str.length; i++){let c = str.charCodeAt(i);//单字节加1if((c >=0x0001&& c <=0x007e)||(0xff60<= c && c <=0xff9f)){
temp++;}else{
temp +=2;}}return temp;}
let temp =0;for(let i =0; i < str.length; i++){if((str.charCodeAt(i)&0xff00)!=0){
temp++;}
temp++;}
let temp =0;const reg =/^[\u4e00-\u9fa5]$/;for(let i =0; i < str.length; i++){if(reg.test(str[i])){
temp +=2;}else{
temp++;}// reg.test(str[i]) ? (temp += 2) : temp++;}