Janilabo

Janilabo | StringOfString() [SCAR Divi]

Apr 28th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.51 KB | None | 0 0
  1. {==============================================================================]  
  2.   Explanation: Returns str * count times. Example: ('ha', 3) => 'hahaha'            
  3. [==============================================================================}
  4. function StringOfString(str: string; count: Integer): string;
  5. var
  6.   i: Integer;
  7. begin
  8.   Result := '';
  9.   if (count > 0) then
  10.     for i := 1 to count do
  11.       Result := (Result + string(str));
  12. end;
  13.  
  14. begin
  15.   ClearDebug;
  16.   WriteLn(StringOfString('ha', 4));
  17. end.
Advertisement
Add Comment
Please, Sign In to add comment