FireDAC.Stan.Intf.TFDStringList.CompareStrings

From RAD Studio API Documentation

Delphi

function CompareStrings(const S1, S2: String): Integer; override;

C++

virtual int __fastcall CompareStrings(const System::UnicodeString S1, const System::UnicodeString S2);

Properties

Type Visibility Source Unit Parent
function protected
FireDAC.Stan.Intf.pas
FireDAC.Stan.Intf.hpp
FireDAC.Stan.Intf TFDStringList

Description

Compares two strings. {{#multireplace:FireDAC.Stan.Intf.TFDStringList.CompareStrings|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.Classes.TStringList.CompareStrings|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:System.Classes.TStringList.CompareStrings|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.

Compares two strings.

The CompareStrings method is used to compare the values of strings that appear in the list.

S1 and S2 are the strings to compare.

CompareStrings returns a value less than 0 if S1 < S2, 0 if S1 = S2, and a value greater than 0 if S1 > S2.

As implemented in TStringList, CompareStrings uses the global AnsiCompareText function, which compares strings case-insensitively if the CaseSensitive property is set to False. Otherwise, the case-sensitive AnsiCompareStr method is used.

See Also