RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.AnsiStrLIComp Function

Compares two strings, case-insensitively, up to the first MaxLen bytes.

Pascal
function AnsiStrLIComp(S1: PChar; S2: PChar; MaxLen: Cardinal): Integer;
C++
int AnsiStrLIComp(const char * S1, const char * S2, unsigned MaxLen);

SysUtils

AnsiStrLIComp compares S1 to S2, without case sensitivity. If S1 or S2 is longer than MaxLen characters, AnsiStrLIComp only compares up to the first MaxLen characters. The compare operation is controlled by the current locale. The return value is:

Condition 
Return Value 
S1 > S2  
> 0  
S1 < S2  
< 0  
S1 = S2 (up to MaxLen characters)  
= 0  

Note: This function supports multi-byte character sets (MBCS).
Note: AnsiStrLIComp can continue the comparison beyond a null terminating character if S1 and S2 are equal up to a null character and the null character occurs before MaxLen bytes.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!