那请问这段函数的作用:
  function StrToHex(AStr:string): string;
var
  I:Integer;
begin
  Result:='';
  For I := 1 to Length(AStr) do
  begin
    Result:=Result+Format('%2x', [Byte(AStr[I])]);
  end;
  I:=Pos(' ', Result);
  While I <> 0 do
    begin
      Result[I] := '0';
      I:=Pos(' ', Result);
    end;
end;