M,
I don't know of a function offhand, but this should do the trick for you....
function Pad(const s : string;n : SmallInt) : string;
begin
result:=s;
if n<0 then
begin
while length(result)<abs(n) do result:=' '+result;
end else
begin
while length(result)<n do result:=result+' ';
end;
end;
------------------------------------------------------------------------
--Donovan
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems, Delphi Developer
Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED]
Voice: +61 2 6285-3460 Fax: +61 2 6285-3459
TVisualBasic = Class(None);
------------------------------------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Mark Howard
Sent: Wednesday, 31 May 2000 15:11
To: Multiple recipients of list delphi
Subject: [DUG]: Building formatted strings
Hi
Another newbie question.
I'm wanting to concatenate 3 strings together into TMemo lines
such that the line will print as 3 columns. Each of the strings
is of variable length. Is there a lazy way of achieving this?
In MBasic (about 100 years ago) you used to be able to LSet or
RSet a string into a fixed length container string.
Any suggestions?
Thanks
Mark
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz