//判断字节数 export function nameBytes(str) { let personNameBytes = str.replace(/[^\x00-\xff]/g, ‘01‘).length return personNameBytes }
前端判断字节数
原文:https://www.cnblogs.com/ChineseLiao/p/12396201.html