RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiString::AnsiCompare Method

Compares the System::AnsiString::AnsiString to another specified string (case-sensitively).

Pascal
function AnsiCompare(const rhs: AnsiString&): Integer;
C++
__fastcall int AnsiCompare(const AnsiString& rhs) const;

Compares this System::AnsiString::AnsiString to rhs, with case sensitivity. The compare operation is controlled by the current Windows locale and is not necessarily the same as using the System::AnsiString::AnsiString comparison operators. System::AnsiString::AnsiCompare is based on a locale-specific collating order. The return value is shown below:

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

 

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