delphi Hex --> String


本文整理自网络,侵删。

 
procedure TForm1.Button2Click(Sender: TObject);
const Source: string = '4D 5A';

var S: string;

t: Integer;

begin

with TStringList.Create do

try

   Text := StringReplace(Source, #32, #13#10, [rfReplaceAll]);

   S := '';

   for t := 0 to Count - 1 do

     S := S + Chr(StrToInt('$' + Strings[t]));

   ShowMessage(S);

finally

   Free;

end;

end;

相关阅读 >>

Delphi 如何获取进程的全路径名

Delphi xe httpencode

Delphi简单加密解密

Delphi android adb usb上读取设备信息

Delphi中combobox.items.indexof用法

Delphi 读取全网站链接

Delphi计算md5

Delphi 之 标签组件(tlabel组件)

Delphi中使用android振动

Delphi xe10 传感器操作

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



打赏

取消

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

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

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

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

评论

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