[Lazarus] Error in UTF8CompareText comment

Jürgen Hestermann juergen.hestermann at gmx.de
Thu Aug 13 11:52:26 CEST 2015


There is a comment for UTF8CompareText in LazUTF8 which is contradictorily:

// Returns: < 0 if S1 < S2, 0 if S1 = S2, > 0 if S2 > S1.

But S1 < S2 is the same as S2 > S1.
In the first case the result should be < 0 and in the second one > 0.

It cannot even be retrieved from the code how it realy works (unless you are fit in assembler).
So when will the result be positive and when negative?





More information about the Lazarus mailing list