delphi 字符串转换为16进制整数 整数转换为16进制字符串


Function Str_HexToInt(Hex: String): integer;
  Var
    HexDigital: Set Of char;
    i: integer;
    Digital: String;
  Begin
    Result := 0;
    HexDigital := ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B',
'C','D', 'E', 'F', 'a', 'b', 'c', 'd', 'e', 'f'];
  If Length(Hex) = 0 Then Exit;
  For i := 1 To Length(Hex) Do
    Begin
      Digital := Copy(Hex, i, 1);
      If (i = 1) And (digital = '$') Then Continue;
    End;
    Digital := Copy(Hex, 1, 1);
    If Digital <> '$' Then Hex := '$' + Hex;
    //Result := StrToInt(Hex);
    Str_HexToInt:=StrToInt(Hex) ;
  End;
整数转换为16进制字符串
str := InttoHex()

联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678