Substr.Format Method

Overload List

#SignatureDescription
1function Format(const Format: Substring; const Args: array of const): Substring; overload;The format text with Args written into it, as Substring.Format.
2function Format(const Format: Substring; const Args: array of const; const AFormatSettings: TFormatSettings): Substring; overload;

Overload 1: function Format(const Format: Substring; const Args: array of const): Substring; overload;

The format text with Args written into it, as Substring.Format.

#NameTypeDescription
1FormatSubstring
2Argsarray of const

Returns: Substring

Remarks:

Called for a Substring format text only.

Examples

A Substring format text.

uses Substr;

procedure Example;
begin
    Assert(Format(Substring('%d-%d'), [1, 2]) = '1-2');
end;

Overload 2: function Format(const Format: Substring; const Args: array of const; const AFormatSettings: TFormatSettings): Substring; overload;

#NameTypeDescription
1FormatSubstring
2Argsarray of const
3AFormatSettingsTFormatSettings

Returns: Substring