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

[复制链接]
 楼主| hotpower 发表于 2023-9-23 10:21 | 显示全部楼层 |阅读模式
菜农电子淘宝:https://hotcomlock.taobao.com/ 准备出书:http://hotcomlock.com/hotcomlock.html
  1.     function QPCodeToHex(hexstring) {
  2.         var i, value, str, hexstr;
  3.         hexstr = "";
  4.         for (i = 0; i < hexstring.length; i += 2)
  5.         {
  6.             value = hextoint(hexstring.substr(i, 2));
  7.             if ((value >= 33 && value <= 60) || (value >= 62 && value <= 126)) {
  8.                 str = String.fromCharCode(value);
  9.             }
  10.             else {
  11.                 str = "=" + hexstring.substr(i, 2);
  12.             }
  13.             hexstr += str;
  14.         }
  15.         hexstr= AsciiToHex(hexstr);
  16.         return hexstr;
  17.     }


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

本版积分规则

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

1460

主题

21619

帖子

508

粉丝
快速回复 在线客服 返回列表 返回顶部
个人签名:[url=http://www.21ic.com/tools/HotWC3_V1.23.html]

1460

主题

21619

帖子

508

粉丝
快速回复 在线客服 返回列表 返回顶部