List of utility methods to do String Capitalize
String | capitalise(final String name) capitalise String s = name; switch (s.length()) { case 0: { break; case 1: { s = name.toUpperCase(); break; ... |
String | capitalise(String line) Returns the given string with the first letter capitalised return Character.toUpperCase(line.charAt(0)) + line.substring(1);
|
String | capitalise(String name) capitalise return Character.toUpperCase(name.charAt(0)) + name.substring(1);
|
String | capitalise(String s) Converts a string to all lower case, and capitalises the first letter of the string if ((s == null) || (s.length() == 0)) return s; char[] chars = s.toLowerCase().toCharArray(); chars[0] = Character.toUpperCase(chars[0]); return String.valueOf(chars); |
String | capitalise(String s) Change the first letter of a string to upper case. return s.isEmpty() ? s : s.charAt(0) + s.substring(1);
|
String | capitalise(String s) capitalise String finalString = ""; if (s.contains(" ")) { StringBuilder builder = new StringBuilder(); String[] sp = s.split(" "); for (String string : sp) { string = string.substring(0, 1).toUpperCase() + string.substring(1).toLowerCase(); builder.append(string); builder.append(" "); ... |
String | capitalise(String s) Describe what the method does if (s.equals("")) { return ""; if (s.length() == 1) { return s.toUpperCase(); } else { String caps = s.substring(0, 1).toUpperCase(); String rest = s.substring(1); ... |
String | capitalise(String str) Returns a capitalised version of the given String if (str == null) { return null; if (str.length() <= 1) { return str.toUpperCase(); return str.substring(0, 1).toUpperCase() + str.substring(1, str.length()); |
String | capitalise(String str) Capitalizes a String changing the first letter to title case as per Character#toTitleCase(char) . return capitalize(str);
|
String | capitalise(String str) Capitalise a String. That is, convert the first character into title-case. if (str == null) { return null; } else if (str.length() == 0) { return ""; } else { return new StringBuilder(str.length()).append(Character.toTitleCase(str.charAt(0))) .append(str, 1, str.length()).toString(); |