[Delphi (Object Pascal)] Delphi比较两个byte数组是否相等 →→→→→进入此内容的聊天室

来自 , 2021-04-28, 写在 Delphi (Object Pascal), 查看 181 次.
URL http://www.code666.cn/view/488e4104
  1. function ByteArraysEqual(const B1, B2: array of Byte): Boolean;
  2. var
  3.   I: Integer;
  4. begin
  5.   Result := Length(B1) = Length(B2);
  6.   if Result then
  7.   begin
  8.     for I := 0 to High(B1) do
  9.     begin
  10.       if B1[I] <> B2[I] then
  11.       begin
  12.         Result := False;
  13.         Exit;
  14.       end;
  15.     end;
  16.   end;
  17. end;
  18. //delphi/2156

回复 "Delphi比较两个byte数组是否相等"

这儿你可以回复上面这条便签

captcha