RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.DupeString Function

Returns the concatenation of a string with itself a specified number of repeats.

Pascal
function DupeString(const AText: string; ACount: Integer): string; overload;
C++
AnsiString DupeString(const AnsiString AText, int ACount);

DupeString returns a string containing ACount repeats of the string specified by AText. For example, 

S := DupeString('Ha', 5); 

sets S to the string 'HaHaHaHaHa'. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!