@Test public void camelCaseConverter () { assertEquals("This Is How It Is", StringUtils.convertCamelCaseToSentence("thisIsHowItIs")); assertEquals("Many Many Test Cases", StringUtils.convertCamelCaseToSentence("manyManyTestCases")); assertNotEquals("Not Camel case", StringUtils.convertCamelCaseToSentence("notCamcelcase")); }
public static String convertCamelCaseToSentence (String camelCase) { return camelCase.substring(0, 1).toUpperCase() + camelCase.substring(1).replaceAll("([A-Z])", " $1"); }
StringUtils { public static String convertCamelCaseToSentence (String camelCase) { return camelCase.substring(0, 1).toUpperCase() + camelCase.substring(1).replaceAll("([A-Z])", " $1"); } }
StringUtils { public static String convertCamelCaseToSentence (String camelCase) { return camelCase.substring(0, 1).toUpperCase() + camelCase.substring(1).replaceAll("([A-Z])", " $1"); } private  StringUtils(); }
StringUtils { public static String convertCamelCaseToSentence (String camelCase) { return camelCase.substring(0, 1).toUpperCase() + camelCase.substring(1).replaceAll("([A-Z])", " $1"); } private  StringUtils(); static String addQuotesIfNecessary(String string); static String generateRandomString(int length); static String convertCamelCaseToSentence(String camelCase); static String trimSpaces(String original); }
StringUtils { public static String convertCamelCaseToSentence (String camelCase) { return camelCase.substring(0, 1).toUpperCase() + camelCase.substring(1).replaceAll("([A-Z])", " $1"); } private  StringUtils(); static String addQuotesIfNecessary(String string); static String generateRandomString(int length); static String convertCamelCaseToSentence(String camelCase); static String trimSpaces(String original);  }