List of utility methods to do String Sentence Case
String | toSentenceCase(final String s) Converts an input string into sentence case, capitalizing the first word in the string and every word that follows a period. final StringBuilder sb = new StringBuilder(s); return toSentenceCase(sb).toString(); |
String | toSentenceCase(String inputString) BETA VERSION: converts an URL to UpperCamelCase TODO: test the correct behavior String result = ""; if (inputString.length() == 0) { return result; char firstChar = inputString.charAt(0); char firstCharToUpperCase = Character.toUpperCase(firstChar); result = result + firstCharToUpperCase; boolean terminalCharacterEncountered = false; ... |
String | toSentenceCase(String original) to Sentence Case String[] lines = original.split("\\."); for (int i = 0; i < lines.length; i++) { lines[i] = toInitialCap(lines[i]); return join(lines, "."); |
String | toSentenceCase(String s, char endOfLineSym) to Sentence Case s = s.toLowerCase(); int strl = s.length(); char[] holder = new char[strl]; boolean sentenceActive = true; int i = 0; while (i < strl) { char nextC = s.charAt(i); if (((sentenceActive) || (i == 0)) && (Character.isLetterOrDigit(nextC))) { ... |
String | toSentenceCase(String str) Returns the string in sentence case. if (isNullOrEmpty(str)) { throw new NullPointerException("Invalid Parameter!, str: " + str); return new StringBuilder().append(Character.toUpperCase(str.charAt(0))).append(str.substring(1)).toString(); |
String | toSentenceCase(String string) to Sentence Case return string.substring(0, 1).toUpperCase() + string.toLowerCase().substring(1);
|