本文整理自网络,侵删。
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 types of actual and formal var parameters must be identical
Delphi+mysql:tadoquery使用插入中文乱码解决方法
Delphi xe 如何实现("再按一次退出") 然后退出程序
Delphi 网上获取北京时间idhttpserver and idhttp 使用 encoding utf8
更多相关阅读请进入《Delphi》频道 >>