List of utility methods to do String Capitalize First
String | capitalizeFirst(String string) capitalize First String capitalized = string; if (string != null && !string.isEmpty()) { if (string.length() == 1) { return capitalized.toUpperCase(); } else { String stringA = string.substring(0, 1); String stringZ = string.substring(1, string.length()); capitalized = stringA.toUpperCase() + stringZ; ... |
String | capitalizeFirst(String toCap) capitalize First String ret = ""; if (null != toCap && toCap.length() > 0) { char first = toCap.charAt(0); first = Character.toUpperCase(first); ret += first; if (toCap.length() > 1) { ret += toCap.substring(1); ... |
String | capitalizeFirst(String toCapitalize) Make first character of String uppercase, and the rest lowercase. if (toCapitalize.length() > 1) { return toCapitalize.substring(0, 1).toUpperCase() + toCapitalize.substring(1, toCapitalize.length()).toLowerCase(); } else { return toCapitalize.toUpperCase(); |
String | capitalizeFirstChar(final String str) capitalize First Char if (str.length() > 1) { return str.substring(0, 1).toUpperCase() + str.substring(1); } else { return str.toUpperCase(); |
String | capitalizeFirstChar(String name) capitalize First Char if (name == null || name.length() == 0) { return name; if (name.startsWith("_")) { return capitalizeFirstChar(name.substring(1)); char chars[] = name.toCharArray(); chars[0] = Character.toUpperCase(chars[0]); ... |
String | capitalizeFirstChar(String name) Capitalize the first character of the name. if ((name == null) || name.equals("")) { return name; char start = name.charAt(0); if (Character.isLowerCase(start)) { start = Character.toUpperCase(start); return start + name.substring(1); return name; |
String | capitalizeFirstChar(String s) capitalize First Char return s.substring(0, 1).toUpperCase() + s.substring(1);
|
String | capitalizeFirstCharacter(final String s) Capitalizes the first character of the given string. if (s == null) { return null; } else if (s.length() <= 0) { return ""; } else { return s.substring(0, 1).toUpperCase() + s.substring(1); |
String | capitalizeFirstCharacter(String s) capitalize First Character if (s != null) { if (s.length() > 1) { s = Character.toUpperCase(s.charAt(0)) + s.substring(1); } else { s = s.toUpperCase(); return s; ... |
String | capitalizeFirstCharacter(String s) capitalize First Character if (s != null && s.isEmpty() == false && Character.isLowerCase(s.charAt(0))) { return Character.toUpperCase(s.charAt(0)) + s.substring(1); } else { return s; |