RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.AnsiStrComp Function

Compares null-terminated character strings.

Pascal
function AnsiStrComp(S1: PChar; S2: PChar): Integer;
C++
int AnsiStrComp(const char * S1, const char * S2);

SysUtils

AnsiStrComp compares S1 to S2, with case sensitivity. The compare operation is controlled by the current locale. The return value is:

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

Note: Most locales consider lowercase characters to be less than the corresponding uppercase characters. This is in contrast to ASCII order, in which lowercase characters are greater than uppercase characters.
Note: This function supports multi-byte character sets (MBCS).
 

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