You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Strings.java 611B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (C) 2011, 2013 Robin Rosenberg
  3. * Copyright (C) 2013 Robin Stocker and others
  4. *
  5. * This program and the accompanying materials are made available under the
  6. * terms of the Eclipse Distribution License v. 1.0 which is available at
  7. * https://www.eclipse.org/org/documents/edl-v10.php.
  8. *
  9. * SPDX-License-Identifier: BSD-3-Clause
  10. */
  11. package org.eclipse.jgit.util.io;
  12. class Strings {
  13. static String repeat(String input, int size) {
  14. StringBuilder sb = new StringBuilder(input.length() * size);
  15. for (int i = 0; i < size; i++)
  16. sb.append(input);
  17. String s = sb.toString();
  18. return s;
  19. }
  20. }