Substr.FmtStr Method

Overload List

#SignatureDescription
1procedure FmtStr(var Result: Substring; const Format: string; const Args: array of const); overload;Writes Args into Result by the format text Format, with the format settings given or FormatSettings.
2procedure FmtStr(var Result: Substring; const Format: string; const Args: array of const; const AFormatSettings: TFormatSettings); overload;

Overload 1: procedure FmtStr(var Result: Substring; const Format: string; const Args: array of const); overload;

Writes Args into Result by the format text Format, with the format settings given or FormatSettings.

#NameTypeDescription
1ResultSubstring
2Formatstring
3Argsarray of const

Result: stored in self (calling object)

Remarks:

Format takes every text kind.

Examples

Formatting into a Substring.

uses Substr;

procedure Example;
var r: Substring;
begin
    FmtStr(r, '%d-%s', [5, 'x']);
    Assert(r = '5-x');
end;

Overload 2: procedure FmtStr(var Result: Substring; const Format: string; const Args: array of const; const AFormatSettings: TFormatSettings); overload;

#NameTypeDescription
1ResultSubstring
2Formatstring
3Argsarray of const
4AFormatSettingsTFormatSettings

Result: stored in self (calling object)