delphi 16进制字符串转原字符串


本文整理自网络,侵删。

 
function myHextoStr(S: string): string;           //16进制字符串转原字符串
var hexS,tmpstr:string;
    i:integer;
    a:byte;
begin
    hexS  :=s;//应该是该字符串
    if length(hexS) mod 2=1 then
    begin
        hexS:=hexS+'0';
    end;
    tmpstr:='';
    for i:=1 to (length(hexS) div 2) do
    begin
        a:=strtoint('$'+hexS[2*i-1]+hexS[2*i]);
        tmpstr := tmpstr+chr(a);
    end;
    result :=tmpstr;
end;

相关阅读 >>

Delphi 检查父进程

Delphi 利用unigui中的tunipagecontrol实现多页面

Delphi中url的汉字编码

Delphi 用webbrowser给要访问的页面加上referer(来路)参数

Delphi串口api函数

Delphi 检查注册表键、键值是否存在

Delphi 写变速齿轮外挂

Delphi datasnap stream 传递大数据

Delphi extractfileext() 获取文件后缀的函数

如何减小Delphi应用程序(exe)的大小

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...