Sign in Join
FPDoc Onlineexperiment

CompareChar0 function

In unit System

Compare two buffers character by character till a null-character is reached.

Declaration

pascal
function CompareChar0(const buf1; const buf2; len: SizeInt): SizeInt

Description

CompareChar0 compares 2 buffers buf1 and buf2 for a maximum length of len or till a null character is reached in either buffer. The result depends on the contents of the buffers:

< 0
If buf1 contains a character less than the corresponding character in buf2.
0
If both buffers are equal
> 0
If buf1 contains a character greater than the corresponding character in buf2.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.