@Test public void returns_empty_if_repeat_count_is_less_than_0() { assertEquals("", StringUtil.repeat("a", -1)); }
public static String repeat(String s, int n) { if (s == null || n < 1) { return ""; } final StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(s); } return sb.toString(); }
StringUtil { public static String repeat(String s, int n) { if (s == null || n < 1) { return ""; } final StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(s); } return sb.toString(); } }
StringUtil { public static String repeat(String s, int n) { if (s == null || n < 1) { return ""; } final StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(s); } return sb.toString(); }  }
StringUtil { public static String repeat(String s, int n) { if (s == null || n < 1) { return ""; } final StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(s); } return sb.toString(); }  static String repeat(String s, int n); }
StringUtil { public static String repeat(String s, int n) { if (s == null || n < 1) { return ""; } final StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(s); } return sb.toString(); }  static String repeat(String s, int n);  }