Words { public static String capitalizeFully(String str) { return capitalizeFully(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 testCapitalizeFully_String() { assertEquals(null, capitalizeFully(null)); assertEquals("", capitalizeFully("")); assertEquals(" ", capitalizeFully(" ")); assertEquals("I", capitalizeFully("I")); assertEquals("I", capitalizeFully("i")); assertEquals("I Am Here 123", capitalizeFully("i am here 123")); assertEquals("I Am Here 123", capitalizeFully("I Am Here 123")); assertEquals("I Am Here 123", capitalizeFully("i am HERE 123")); assertEquals("I Am Here 123", capitalizeFully("I AM HERE 123")); }
@Test public void testCapitalizeFullyWithDelimiters_String() { assertEquals(null, capitalizeFully(null, null)); assertEquals("", capitalizeFully("", new char[0])); assertEquals(" ", capitalizeFully(" ", new char[0])); char[] chars = new char[]{'-', '+', ' ', '@'}; assertEquals("I", capitalizeFully("I", chars)); assertEquals("I", capitalizeFully("i", chars)); assertEquals("I-Am Here+123", capitalizeFully("i-am here+123", chars)); assertEquals("I Am+Here-123", capitalizeFully("I Am+Here-123", chars)); assertEquals("I+Am-Here 123", capitalizeFully("i+am-HERE 123", chars)); assertEquals("I-Am Here+123", capitalizeFully("I-AM HERE+123", chars)); chars = new char[]{'.'}; assertEquals("I am.Fine", capitalizeFully("i aM.fine", chars)); assertEquals("I Am.fine", capitalizeFully("i am.fine", null)); }