Substring.Copy Method

Overload List

#SignatureDescription
1class function Copy(const Str: Substr.Substring): Substr.Substring; overload; static;The whole of Str as a Substring.
2class function Copy(const Str: string): Substr.Substring; overload; static;

Overload 1: class function Copy(const Str: Substr.Substring): Substr.Substring; overload; static;

The whole of Str as a Substring.

#NameTypeDescription
1StrSubstr.Substring

Returns: Substring - Of a Substring, its text as Mid returns it; of any other text kind, a copy.

Examples

A string copied in.

uses Substr;

procedure Example;
begin
    Assert(Substring.Copy('abc') = 'abc');
end;

Overload 2: class function Copy(const Str: string): Substr.Substring; overload; static;

#NameTypeDescription
1Strstring

Returns: Substring