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 优化mdb文件

Delphi 读写文本文件

Delphi zlib 流压缩解压

Delphi 10.3 断点全部失效

Delphixe7关于android 检测屏幕是否处于关闭状态

Delphi判断字符是否是汉字

Delphi 设置richedit的行间距

Delphi comobj调用wmplayer播放音乐

Delphi tms web core js callproc

Delphi之完美splash方案

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



打赏

取消

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

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

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

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

评论

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