Skip to content

Instantly share code, notes, and snippets.

@tag1216
Last active August 29, 2015 14:10
Show Gist options
  • Save tag1216/4ce8c5c0d8d60e818d77 to your computer and use it in GitHub Desktop.
Save tag1216/4ce8c5c0d8d60e818d77 to your computer and use it in GitHub Desktop.
指定文字列をn回繰り返す
public static String repeat(String value, int count) {
return IntStream.range(0, count)
.collect(StringBuilder::new, (sb, x) -> sb.append(value), StringBuilder::append)
.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment