@Test public void testFillString() { String actual = "test"; String resultRight = "test "; String resultLeft = " test"; Assert.assertEquals(StringTool.fillStringRight(actual, ' ', 8), resultRight); Assert.assertEquals(StringTool.fillStringRight(actual, ' ', 2), "te"); Assert.assertEquals(StringTool.fillStringLeft(actual, ' ', 8), resultLeft); Assert.assertEquals(StringTool.fillStringLeft(actual, ' ', 2), "st"); Assert.assertEquals(StringTool.fillStringLeft(resultRight, ' ', 4), " "); }
public static String fillString(char fillChar, int count) { char[] chars = new char[count]; java.util.Arrays.fill(chars, fillChar); return new String(chars); }
StringTool { public static String fillString(char fillChar, int count) { char[] chars = new char[count]; java.util.Arrays.fill(chars, fillChar); return new String(chars); } }
StringTool { public static String fillString(char fillChar, int count) { char[] chars = new char[count]; java.util.Arrays.fill(chars, fillChar); return new String(chars); } private  StringTool(); }
StringTool { public static String fillString(char fillChar, int count) { char[] chars = new char[count]; java.util.Arrays.fill(chars, fillChar); return new String(chars); } private  StringTool(); static String toFirstLower(String string); static String toFirstUpper(String string); static String fillStringRight(String s, char fillChar, int size); static String fillStringLeft(String s, char fillChar, int size); static String truncRight(String s, int size); static String truncLeft(String s, int size); static String fillString(char fillChar, int count); static String deleteAccent(String s); static boolean equalsIgnoreCaseAndAccents(String s1, String s2); static boolean isDigital(String s); static String extractStringFromRight(String string, int startIndex, int lenght); static String getHexString(byte[] bytes); static String capitalizeFirstLetter(String s); static List<Integer> getIntegerList(String string); static String getIdListString(Collection<? extends Model> collection); static String getFilename(String name); static String cutTooLongString(String str); }
StringTool { public static String fillString(char fillChar, int count) { char[] chars = new char[count]; java.util.Arrays.fill(chars, fillChar); return new String(chars); } private  StringTool(); static String toFirstLower(String string); static String toFirstUpper(String string); static String fillStringRight(String s, char fillChar, int size); static String fillStringLeft(String s, char fillChar, int size); static String truncRight(String s, int size); static String truncLeft(String s, int size); static String fillString(char fillChar, int count); static String deleteAccent(String s); static boolean equalsIgnoreCaseAndAccents(String s1, String s2); static boolean isDigital(String s); static String extractStringFromRight(String string, int startIndex, int lenght); static String getHexString(byte[] bytes); static String capitalizeFirstLetter(String s); static List<Integer> getIntegerList(String string); static String getIdListString(Collection<? extends Model> collection); static String getFilename(String name); static String cutTooLongString(String str);  }