Substring.EndsWith Method

Overload List

#SignatureDescription
1function EndsWith(const S: Substring): Boolean; overload;Whether the text ends with S, ordinal.
2function EndsWith(const S: string): Boolean; overload;

Overload 1: function EndsWith(const S: Substring): Boolean; overload;

Whether the text ends with S, ordinal.

#NameDescription
1S

A text of every kind, or a Char.

Returns: Boolean - True when it does, and for an empty S.

Examples

Suffixes.

uses Substr;

procedure Example;
begin
    Assert(Substring('hello').EndsWith('lo'));
    Assert(not Substring('hello').EndsWith('he'));
end;

Overload 2: function EndsWith(const S: string): Boolean; overload;

#NameTypeDescription
1Sstring

Returns: Boolean