List of utility methods to do String Capitalize First
String | capitaliseFirst(String string) capitalise First return Character.toTitleCase(string.charAt(0)) + string.substring(1, string.length());
|
String | capitaliseFirstLetter(final String originalLanguageName) Capitalises the first letter, hoping this works for all Locales. final char codePointAt = originalLanguageName.charAt(0); final char firstLetterTitle = Character.toTitleCase(codePointAt); return firstLetterTitle + originalLanguageName.substring(1); |
String | capitaliseFirstLetter(String s) capitalise First Letter int n = s.length(); if (n == 0) { return ""; StringBuilder builder = new StringBuilder(); builder.append(s.substring(0, 1).toUpperCase()); if (n > 1) { builder.append(s.substring(1, n)); ... |
String | capitaliseFirstLetter(String str) Capitalizes first letter of given string. return str.substring(0, 1).toUpperCase() + str.substring(1);
|
String | capitaliseFirstLetter(String str) Capitalize the first letter of a string. if (str == null) { return null; switch (str.length()) { case 0: return str; case 1: return str.substring(0, 1).toUpperCase(); ... |
String | capitaliseFirstLetter(String text) capitalise First Letter if (text == null || text.length() <= 0) return text; return text.substring(0, 1).toUpperCase() + text.substring(1); |
String | capitalizedFirst(String str) capitalized First return str.substring(0, 1).toUpperCase() + str.substring(1);
|
String | capitalizedLetter(String str, boolean onlyFirst) Capitalized first letter for each words or only first one StringBuilder res = new StringBuilder(); char ch, prevCh; boolean toUpper = true; prevCh = '.'; str = str.toLowerCase(); for (int i = 0; i < str.length(); i++) { ch = str.charAt(i); if (ch == 's' && prevCh == '\'') { ... |
String | capitalizeFirst(String attribute) capitalize First return Character.toUpperCase(attribute.charAt(0)) + attribute.substring(1);
|
String | capitalizeFirst(String input) capitalize First if (input == null) return null; if (input.length() < 2) return input.toUpperCase(); return input.substring(0, 1).toUpperCase() + input.substring(1); |