RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DBTables.NativeCompareStr Function

Compares strings based on a database locale case sensitively.

Pascal
function NativeCompareStr(Locale: TLocale; const S1: AnsiString; const S2: AnsiString; Len: Integer): Integer;
C++
int NativeCompareStr(TLocale Locale, const AnsiString S1, const AnsiString S2, int Len);

NativeCompareStr compares S1 to S2, up to a length of Len characters. If the Len parameter is 0, NativeCompareStr compares the strings up to their entire length. The comparison is performed with case sensitivity. The compare operation is controlled by the database locale specified as the Locale parameter. The return value is:

Condition 
Return Value 
S1 > S2  
> 0  
S1 < S2  
< 0  
S1 = S2  
= 0  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!