Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

CompareMemRange

Compare 2 memory locations.

Declaration

Source position: sysstrh.inc line 82

function CompareMemRange(

  P1: Pointer;

  P2: Pointer;

  Length: PtrUInt

):Integer;

Description

CompareMemRange compares the 2 memory locations pointed to by P1 and P2 byte per byte. It stops comparing after Length bytes have been compared, or when it has encountered 2 different bytes. The result is then

>0
if a byte in range P1 was found that is bigger than the corresponding byte in range P2.
0
if all bytes in range P1 are the same as the corresponding bytes in range P2.
<0
if a byte in range P1 was found that is less than the corresponding byte in range P2.

Errors

None.

See also

SameText

  

Checks whether 2 strings are the same (case insensitive).


Documentation generated on: Oct 27 2024