RosettaCodeData/Task/Repeat-a-string/Delphi/repeat-a-string-3.pas
2024-10-16 18:07:41 -07:00

7 lines
144 B
ObjectPascal

function RepeatStr(const s: string; i: Cardinal): string;
begin
if i = 0 then
result := ''
else
result := s + RepeatStr(s, i-1)
end;