/**
 *通过字符计算长度
 * @param fData
 * @returns
 */
export function DataLength(fData: string) {
  let intLength = 0;
  for (let i = 0; i < fData.length; i++) {
    if (fData.charCodeAt(i) <= 40869 && fData.charCodeAt(i) >= 19968) intLength = intLength + 13;
    else if (fData.charCodeAt(i) >= 65 && fData.charCodeAt(i) <= 122) intLength = intLength + 7;
    else if (fData.charCodeAt(i) >= 48 && fData.charCodeAt(i) <= 57) intLength = intLength + 8;
    else intLength = intLength + 3;
  }
  return intLength == 0 ? 8 : intLength + 12;
}
