@Test public void testRepeat() { assertThat(repeat('0', 0), is("")); assertThat(repeat('1', 3), is("111")); }
public static String repeat(char value, int n) { return new String(new char[n]).replace("\0", String.valueOf(value)); }
Strings { public static String repeat(char value, int n) { return new String(new char[n]).replace("\0", String.valueOf(value)); } }
Strings { public static String repeat(char value, int n) { return new String(new char[n]).replace("\0", String.valueOf(value)); } private  Strings(); }
Strings { public static String repeat(char value, int n) { return new String(new char[n]).replace("\0", String.valueOf(value)); } private  Strings(); static String toCsv(List<String> src); static String join(List<String> src, String delimiter); static String capitaliseFirstLetter(String string); static String lowercaseFirstLetter(String string); static String zeros(int n); static String repeat(char value, int n); static boolean isEmpty(String s); static byte[] asciiToHex(String asciiValue, int length); static String hexStringToAscii(String hexStr); }
Strings { public static String repeat(char value, int n) { return new String(new char[n]).replace("\0", String.valueOf(value)); } private  Strings(); static String toCsv(List<String> src); static String join(List<String> src, String delimiter); static String capitaliseFirstLetter(String string); static String lowercaseFirstLetter(String string); static String zeros(int n); static String repeat(char value, int n); static boolean isEmpty(String s); static byte[] asciiToHex(String asciiValue, int length); static String hexStringToAscii(String hexStr);  }