mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 10:29:29 +02:00
* Overloaded version of TStrings.Add that accepts Fmt,Args
git-svn-id: trunk@30301 -
This commit is contained in:
parent
e3111faa2e
commit
063d7f1ce2
@ -654,8 +654,10 @@ type
|
||||
Function GetNextLinebreak (Const Value : String; Var S : String; Var P : Integer) : Boolean;
|
||||
public
|
||||
destructor Destroy; override;
|
||||
function Add(const S: string): Integer; virtual;
|
||||
function AddObject(const S: string; AObject: TObject): Integer; virtual;
|
||||
function Add(const S: string): Integer; virtual; overload;
|
||||
function AddObject(const S: string; AObject: TObject): Integer; virtual; overload;
|
||||
function Add(const Fmt : string; const Args : Array of const): Integer; overload;
|
||||
function AddObject(const Fmt: string; Args : Array of const; AObject: TObject): Integer; overload;
|
||||
procedure Append(const S: string);
|
||||
procedure AddStrings(TheStrings: TStrings); overload; virtual;
|
||||
procedure AddStrings(const TheStrings: array of string); overload; virtual;
|
||||
|
@ -675,6 +675,11 @@ begin
|
||||
Insert (Count,S);
|
||||
end;
|
||||
|
||||
function TStrings.Add(const Fmt : string; const Args : Array of const): Integer;
|
||||
|
||||
begin
|
||||
Result:=Add(Format(Fmt,Args));
|
||||
end;
|
||||
|
||||
|
||||
Function TStrings.AddObject(const S: string; AObject: TObject): Integer;
|
||||
@ -684,6 +689,11 @@ begin
|
||||
Objects[result]:=AObject;
|
||||
end;
|
||||
|
||||
function TStrings.AddObject(const Fmt: string; Args : Array of const; AObject: TObject): Integer;
|
||||
|
||||
begin
|
||||
Result:=AddObject(Format(Fmt,Args),AObject);
|
||||
end;
|
||||
|
||||
|
||||
Procedure TStrings.Append(const S: string);
|
||||
|
Loading…
Reference in New Issue
Block a user