DelphiBasics
DupeString
Function
Creates a string containing copies of a substring StrUtils unit
 function DupeString(const Source string; Count Integer):string;
Description
The DupeString function creates a string containing a sequence of Count copies of a Source string.
Related commands
StringOfCharCreates a string with one character repeated many times
 Download this web site as a Windows program.




 
Example code : A simple example
var
  myString : AnsiString;
begin
  myString := DupeString('Hello ', 3);

  ShowMessage('myString = '''+myString+'''');
end;
Show full unit code
  myString = 'Hello Hello Hello '
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page