function getStringLength (str) {
let len = 0;
for (let i = 0; i < str.length; i++) {
if (str.charAt(i).match(/[\u4e00-\u9fa5]/g) != null) len += 2;
else len += 1;
}
return len;
}
function getStringLength (str) {
let len = 0;
for (let i = 0; i < str.length; i++) {
if (str.charAt(i).match(/[\u4e00-\u9fa5]/g) != null) len += 2;
else len += 1;
}
return len;
}