Delphi中字符與10/16進制互轉換

Delphi中字符與10/16進制互轉換

 

showmessage(IntToStr(Ord('a'))+' '+IntToHex(Ord('a'),2));

showmessage(chr(97));

showmessage(IntToStr(Ord('A'))+' '+IntToHex(Ord('A'),2)); 

 showmessage(chr(65));

 

showmessage(IntToHex(Ord('中'),2)+' '+IntToHex(Ord('文'),2));
showmessage(chr(StrToInt('$'+'4E2D'))+chr($6587));

 

 showmessage(IntToStr(Ord('中'))+' '+IntToStr(Ord('文')));
 showmessage(chr(20013)+chr(25991));

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章