Substring.Contains Method

Overload List

#SignatureDescription
1function Contains(const S: Substring): Boolean; overload;Whether S occurs in the text, ordinal.
2function Contains(const S: string): Boolean; overload;

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

Whether S occurs in the text, ordinal.

#NameDescription
1S

A text of every kind, or a Char.

Returns: Boolean - True when it occurs; False for an empty S.

Examples

Contained and empty texts.

uses Substr;

procedure Example;
begin
    Assert(Substring('hello').Contains('ell'));
    Assert(not Substring('hello').Contains(''));
end;

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

#NameTypeDescription
1Sstring

Returns: Boolean