Words { public static String uncapitalize(String str) { return uncapitalize(str, null); } private  Words(); static String wrap(String str, int wrapLength); static String wrap(String str, int wrapLength, String newLineStr, boolean wrapLongWords); static String capitalize(String str); static String capitalize(String str, char[] delimiters); static String capitalizeFully(String str); static String capitalizeFully(String str, char[] delimiters); static String uncapitalize(String str); static String uncapitalize(String str, char[] delimiters); static String initials(String str); static String initials(String str, char[] delimiters);  }
@Test public void testUncapitalize_String() { assertEquals(null, uncapitalize(null)); assertEquals("", uncapitalize("")); assertEquals(" ", uncapitalize(" ")); assertEquals("i", uncapitalize("I")); assertEquals("i", uncapitalize("i")); assertEquals("i am here 123", uncapitalize("i am here 123")); assertEquals("i am here 123", uncapitalize("I Am Here 123")); assertEquals("i am hERE 123", uncapitalize("i am HERE 123")); assertEquals("i aM hERE 123", uncapitalize("I AM HERE 123")); }
@Test public void testUncapitalizeWithDelimiters_String() { assertEquals(null, uncapitalize(null, null)); assertEquals("", uncapitalize("", new char[0])); assertEquals(" ", uncapitalize(" ", new char[0])); char[] chars = new char[]{'-', '+', ' ', '@'}; assertEquals("i", uncapitalize("I", chars)); assertEquals("i", uncapitalize("i", chars)); assertEquals("i am-here+123", uncapitalize("i am-here+123", chars)); assertEquals("i+am here-123", uncapitalize("I+Am Here-123", chars)); assertEquals("i-am+hERE 123", uncapitalize("i-am+HERE 123", chars)); assertEquals("i aM-hERE+123", uncapitalize("I AM-HERE+123", chars)); chars = new char[]{'.'}; assertEquals("i AM.fINE", uncapitalize("I AM.FINE", chars)); assertEquals("i aM.FINE", uncapitalize("I AM.FINE", null)); }