System.SysUtils.TStringHelper.Equals
Delphi
function Equals(const Value: string): Boolean; overload;
class function Equals(const a: string; const b: string): Boolean; overload; static;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TStringHelper |
Description
Returns whether the two given 0-based strings are identical.
Equals is a a function that returns whether two 0-based strings are identical or not. There are two Equals overloaded methods. The first one returns whether this string is equal to the string passed through the Value
parameter. The second overloaded method is a static class function that can be called to check for equality between the two passed strings.
var
MyString1: String;
MyString2: String;
begin
MyString1 := 'This is one string.';
MyString2 := 'This is another string.';
Writeln(Boolean(MyString1.Equals(MyString2)));
Writeln(Boolean(String.Equals(MyString1, MyString2)));
end.
Output:
FALSE FALSE