Substring.StartsWith Method

Overload List

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

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

Whether the text starts 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

Prefixes.

uses Substr;

procedure Example;
begin
    Assert(Substring('hello').StartsWith('he'));
    Assert(Substring('hello').StartsWith(''));
end;

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

#NameTypeDescription
1Sstring

Returns: Boolean