Sign in Join
FPDoc Onlineexperiment

IncrementalCompareString function

In unit unicodedata

Compare 2 strings using the specified collation.

Declaration

pascal
function IncrementalCompareString(const AStrA: PUnicodeChar; 
 const ALengthA: SizeInt; 
 const AStrB: PUnicodeChar; 
 const ALengthB: SizeInt; 
 const ACollation: PUCA_DataBook)
: Integer; overload

Arguments

AStrA

First string in comparison.

ALengthA

Length of string AStrA.

AStrB

Second string in comparison.

ALengthB

Length of string AStrN.

ACollation

Collation to use.

Function result

A signed integer indicating the alphabetic order of AStrA and AStrB.

Description

IncrementalCompareString creates 2 compare keys from the strings AStrA and AStrB using collation data in ACollation. The keys are computed only to the point where the two strings differ. This means the keys cannot be reused for other comparisons if the strings differ. The two strings can be specified as a unicode string or as a pointer to a null-terminated character array with a length ( ALengthA and ALengthB). It returns then the result of CompareSortKey.

Errors

None.

See also

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