List of utility methods to do String Upper Case
String | toUpperCaseFirstChar(String str) to Upper Case First Char if (str == null || str.length() == 0) { return null; if (Character.isUpperCase(str.charAt(0))) { return str; } else { return (new StringBuilder()).append(Character.toUpperCase(str.charAt(0))).append(str.substring(1)) .toString(); ... |
String | toUpperCaseFirstChar(String string) to Upper Case First Char return string == null ? null : string.toUpperCase().charAt(0) + string.substring(1);
|
String | toUpperCaseFirstChar(String string) to Upper Case First Char if (string == null || string.length() == 0) { return string; } else { char[] charArray = string.toCharArray(); for (int i = 0; i < charArray.length; i++) { if (i == 0) { charArray[0] = Character.toUpperCase(charArray[0]); } else { ... |
String | toUpperCaseFirstChar(String text) Transforms "some text" into "Some text" if (text != null && text.length() > 0) { return text.substring(0, 1).toUpperCase() + text.substring(1); return text; |
String | toUppercaseFirstCharacter(String s) to Uppercase First Character if (s == null || s.length() == 0) { return s; return Character.toUpperCase(s.charAt(0)) + (s.length() > 1 ? s.substring(1) : ""); |
String | toUpperCaseFirstCharacter(String str) to Upper Case First Character return str.substring(0, 1).toUpperCase() + str.substring(1);
|
String | toUpperCaseFirstCharForWord(String string) to Upper Case First Char For Word if (string == null || string.length() == 0) { return string; } else { StringBuilder palavra = new StringBuilder(); String[] words = string.split(" "); char[] charArray = null; for (String word : words) { charArray = word.toCharArray(); ... |
String | toUpperCaseFirstLetter(String str) to Upper Case First Letter return str.substring(0, 1).toUpperCase() + str.substring(1);
|
String | toUppercaseFirstLetter(String str) to Uppercase First Letter if (str == null || str.length() == 0) { return str; char firstLetter = str.charAt(0); if (Character.isLowerCase(firstLetter)) { if (str.length() > 1) { return "" + Character.toUpperCase(firstLetter) + str.substring(1); } else { ... |
void | toUpperCaseFirstLetter(StringBuilder sb) to Upper Case First Letter char first = sb.charAt(0);
first = Character.toUpperCase(first);
sb.setCharAt(0, first);
|