List of utility methods to do String Capitalize
String | capitalizeString(String toCapitalize) capitalize String if (notEmpty(toCapitalize)) { StringBuffer returnBuffer = new StringBuffer(); char firstChar = toCapitalize.charAt(0); returnBuffer.append(("" + firstChar).toUpperCase()); for (int i = 1; i < toCapitalize.length(); i++) { returnBuffer.append(("" + toCapitalize.charAt(i)).toLowerCase()); return returnBuffer.toString(); ... |
String | capitalizeToUpper(String line) capitalize To Upper return Character.toUpperCase(line.charAt(0)) + line.substring(1);
|
String | toCapitalized(Object obj) to Capitalized if (obj instanceof String) { String s = (String) obj; return s.substring(0, 1).toUpperCase() + s.substring(1); } else { return null; |