[实用程序源码及工具软件] HotCRC内的HexToQPCode()源码

[复制链接]
 楼主| 发表于 2023-9-23 10:19 | 显示全部楼层 |阅读模式
菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.html
  1.     function HexToQPCode(hexstr) {
  2.         var i, str, value, ch ,hexstrString;
  3.         hexstrString = "";
  4.         i = 0;
  5.         while(i < hexstr.length)
  6.         {
  7.             str = hexstr.substr(i, 2);
  8.             value = hextoint(str);
  9.             ch = String.fromCharCode(value);
  10.             if(ch != "=") {
  11.                 i += 2;
  12.             }
  13.             else {
  14.                 ch = hexstr.substr(i + 2, 4);
  15.                 str = HexToAscii(ch);
  16.                 i += 6;
  17.             }
  18.             hexstrString += str;
  19.         }
  20.         return hexstrString;//输出3N个字节
  21.     }

您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:[url=http://www.21ic.com/tools/HotWC3_V1.23.html]

1460

主题

21619

帖子

508

粉丝
快速回复 返回顶部 返回列表