Sign in Join
FPDoc Onlineexperiment

UTF8CompareTextP function

In unit LazUTF8

Performs a case-insensitive comparision for the specified UTF-8-encoded PChar values.

Declaration

pascal
function UTF8CompareTextP(S1: PChar; S2: PChar): PtrInt

Description

Converts values in S1 and S2 to UTF-16 encoding, and calls WideCompareText to get the return value for the case-insensitive comparison. The return value contains the relative difference between the compared values. For instance:

  • <0 when S1<S2.
  • 0 when S1=S2.
  • >0 when S1>S2.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.