Sign in Join
FPDoc Onlineexperiment

strcomp function

In unit sysutils

Compare 2 null-terminated strings, case sensitive.

Declaration

pascal
function StrComp(str1: PAnsiChar; str2: PAnsiChar): SizeInt

Description

Compares the null-terminated strings S1 and S2. The result is

  • A negative Longint when S1<S2.
  • 0 when S1=S2.
  • A positive Longint when S1>S2.

For an example, see StrLComp.

Errors

None.

See also

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