Java Utililty Methods String Sentence Case

List of utility methods to do String Sentence Case

Description

The list of methods to do String Sentence Case are organized into topic(s).

Method

StringtoSentenceCase(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();
StringtoSentenceCase(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;
...
StringtoSentenceCase(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, ".");
StringtoSentenceCase(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))) {
...
StringtoSentenceCase(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();
StringtoSentenceCase(String string)
to Sentence Case
return string.substring(0, 1).toUpperCase() + string.toLowerCase().substring(1);