SoFunction
Updated on 2025-04-02

Flex regular expression to judge Chinese or full-width character code


for(var i:int=0;i<;i++){
var char:String = (i,1);
if(/[^\x00-\xff]/(char)){ // Add 10 in Chinese
screenLength = screenLength + 10;
}else{
screenLength = screenLength + 1;
}
}