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 string.split 按照任意字符串分割语句

Delphi twebbrowser:确定带有框架的页面何时完成

Delphi 扫二维码并识别

Delphi之木马生成原理(资源文件,和文件流的应用)

Delphi winapi: getparent、setparent、movewindow - 获取、指定父窗口和移动窗口

Delphi 倒计时对话框

Delphi 圆角panel

Delphi 上次访问该文件的时间

Delphi 键盘钩子的简单应用

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



打赏

取消

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

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

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

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

评论

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