System.SysUtils.TStringHelper.Format

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

class function Format(const Format: string; const args: array of const): string; overload; static;

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
function public System.SysUtils.pas System.SysUtils TStringHelper

Beschreibung

Identisch mit der Funktion Format.

Equals ist eine Klassenfunktion, die einen formatierten nullbasierten String auf Basis des angegebenen Parameters zurückgibt.

var
  MyString1: String;
  MyString2: String;

begin
  MyString1 := 'This is a %s';
  MyString2 := 'string.';
  Writeln(String.Format(MyString1, [MyString2]));
end.

Ausgabe:

This is a string.

Siehe auch