List of utility methods to do String Capitalize
String | capitalizePlayerName(String name) capitalize Player Name String capitalizedName = name.substring(0, 1).toUpperCase() + name.substring(1);
return capitalizedName;
|
String | capitalizePropertyName(String propertyName) capitalize Property Name return propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
|
String | capitalizePropertyName(String s) Return a capitalized version of the specified property name. if (s.length() == 0) { return s; char[] chars = s.toCharArray(); chars[0] = Character.toUpperCase(chars[0]); return new String(chars); |
String | capitalizeString(final String in) capitalize String if (in.isEmpty()) return in; final StringBuilder sb = new StringBuilder(in.length()); sb.append(Character.toUpperCase(in.charAt(0))); for (int i = 1; i < in.length(); i++) { sb.append(Character.toLowerCase(in.charAt(i))); return sb.toString(); ... |
String | capitalizeString(String aString) capitalize String if (aString != null && aString.length() > 0) return aString.substring(0, 1).toUpperCase() + aString.substring(1); return ""; |
String | capitalizeString(String str) capitalize String int strLen; if (str == null || (strLen = str.length()) == 0) { return str; StringBuffer buffer = new StringBuffer(strLen); boolean whitespace = true; for (int i = 0; i < strLen; i++) { char ch = str.charAt(i); ... |
String | capitalizeString(String string) capitalize String char[] chars = string.toCharArray(); chars[0] = Character.toUpperCase(chars[0]); return String.valueOf(chars); |
String | capitalizeString(String string) Returns the string defined by parameter string capitalized (the first letter in uppercase).
if (string.length() == 0) return string; String firstLetter = string.substring(0, 1); String theRest = string.substring(1, string.length()); return firstLetter.toUpperCase() + theRest; |
String | capitalizeString(String string) capitalize String char[] chars = string.toLowerCase().toCharArray(); boolean found = false; for (int i = 0; i < chars.length; i++) { if (!found && Character.isLetter(chars[i])) { chars[i] = Character.toUpperCase(chars[i]); found = true; } else if (Character.isWhitespace(chars[i]) || chars[i] == '.' || chars[i] == '\'') { found = false; ... |
String | capitalizeString(String text, boolean replaceUnderscore) Fix the given text with making the first letter captializsed and the rest not. if (text.isEmpty()) { return text; if (text.length() == 1) { return text.toUpperCase(); String toReturn = text.substring(0, 1).toUpperCase() + text.substring(1).toLowerCase(); if (replaceUnderscore) { ... |