@Test public void testCapitaliseFirstLetter() { assertThat(capitaliseFirstLetter(""), is("")); assertThat(capitaliseFirstLetter("a"), is("A")); assertThat(capitaliseFirstLetter("aa"), is("Aa")); assertThat(capitaliseFirstLetter("A"), is("A")); assertThat(capitaliseFirstLetter("Ab"), is("Ab")); }
public static String capitaliseFirstLetter(String string) { if (string == null || string.length() == 0) { return string; } else { return string.substring(0, 1).toUpperCase() + string.substring(1); } }
Strings { public static String capitaliseFirstLetter(String string) { if (string == null || string.length() == 0) { return string; } else { return string.substring(0, 1).toUpperCase() + string.substring(1); } } }
Strings { public static String capitaliseFirstLetter(String string) { if (string == null || string.length() == 0) { return string; } else { return string.substring(0, 1).toUpperCase() + string.substring(1); } } private  Strings(); }
Strings { public static String capitaliseFirstLetter(String string) { if (string == null || string.length() == 0) { return string; } else { return string.substring(0, 1).toUpperCase() + string.substring(1); } } 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); }
Strings { public static String capitaliseFirstLetter(String string) { if (string == null || string.length() == 0) { return string; } else { return string.substring(0, 1).toUpperCase() + string.substring(1); } } 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);  }