I just saw the js method I wrote before: calculate the length of the string (2 characters in Chinese).
method:
var str = '123 Yes Yes';
var strArr = str.split('');
var count = 0;
for(strArr.length){ **** }
………………………… (No more code, I'm tired!!)
After modification:
The code copy is as follows:
var str = '123 Yes Yes';
var tmpStr = str.replace(/[/u4e00-/u9fa5]/gi,"aa");
tmpStr.length