Guest User

Untitled

a guest
Jul 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. // Duplicates a string count times. If count is
  2. // not a positive number then the empty string
  3. // is returned.
  4. String Duplicate(String src, int count) {
  5. String result = "";
  6. for (int i = 0; i < count; i++) {
  7. result += src;
  8. }
  9. return result;
  10. }
Add Comment
Please, Sign In to add comment