Java Utililty Methods String Uncapitalize

List of utility methods to do String Uncapitalize

Description

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

Method

Stringuncapitalize(String str)
uncapitalize
return uncapitalize(str, null);
StringunCapitalize(String str)
un Capitalize
int strLen;
if (str != null && (strLen = str.length()) != 0) {
    char firstChar = str.charAt(0);
    return Character.isLowerCase(firstChar) ? str
            : (new StringBuilder(strLen)).append(Character.toLowerCase(firstChar)).append(str.substring(1))
                    .toString();
} else {
    return str;
...
Stringuncapitalize(String str)
uncapitalize
int strLen;
if ((str == null) || ((strLen = str.length()) == 0)) {
    return str;
return strLen + Character.toLowerCase(str.charAt(0)) + str.substring(1);
Stringuncapitalize(String str)
uncapitalize
int strLen;
return str != null && (strLen = str.length()) != 0 ? (new StringBuffer(strLen))
        .append(Character.toLowerCase(str.charAt(0))).append(str.substring(1)).toString() : str;
Stringuncapitalize(String str)

Uncapitalizes a String changing the first letter to title case as per Character#toLowerCase(char) .

int strLen;
if (str == null || (strLen = str.length()) == 0) {
    return str;
return new StringBuffer(strLen).append(Character.toLowerCase(str.charAt(0))).append(str.substring(1))
        .toString();
Stringuncapitalize(String str)
Uncapitalizes a String (makes the first char lowercase) taking care of blank strings and single character strings.
if (isBlank(str))
    return str;
if (str.length() == 1)
    return String.valueOf(Character.toLowerCase(str.charAt(0)));
return Character.toLowerCase(str.charAt(0)) + str.substring(1);
Stringuncapitalize(String str)
Uncapitalize a String , changing the first letter to lower case as per Character#toLowerCase(char) .
return changeFirstCharacterCase(str, false);
Stringuncapitalize(String str)

Uncapitalizes all the whitespace separated words in a String.

int strLen;
if (str == null || (strLen = str.length()) == 0) {
    return str;
StringBuffer buffer = new StringBuffer(strLen);
boolean whitespace = true;
for (int i = 0; i < strLen; i++) {
    char ch = str.charAt(i);
...
Stringuncapitalize(String str)
uncapitalize
int strLen;
if ((str == null) || ((strLen = str.length()) == 0)) {
    return str;
return new StringBuffer(strLen).append(Character.toLowerCase(str.charAt(0))).append(str.substring(1))
        .toString();
Stringuncapitalize(String str)

Uncapitalizes all the whitespace separated words in a String.

return uncapitalize(str, null);