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(CharSequence cs)

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

if (cs == null) {
    return null;
int strLen;
if ((strLen = cs.length()) == 0) {
    return cs.toString();
return new StringBuilder(strLen).append(Character.toLowerCase(cs.charAt(0))).append(subSequence(cs, 1))
...
Stringuncapitalize(final CharSequence s)
uncapitalize
return (s.length() >= 2) && Character.isHighSurrogate(s.charAt(0)) && Character.isLowSurrogate(s.charAt(1))
        ? s.toString().substring(0, 2).toLowerCase(Locale.US) + s.toString().substring(2)
        : s.toString().substring(0, 1).toLowerCase(Locale.US) + s.toString().substring(1);
CharSequenceuncapitalize(final CharSequence sequence)
Uncapitalizes a character sequence changing the first letter to title case as per Character#toLowerCase(char) .
return modifyFirstChar(sequence, Character::isLowerCase, Character::toLowerCase);
Stringuncapitalize(final String s)
uncapitalize
int i = s.length();
if (i > 0) {
    char[] c = null;
    char c1 = s.charAt(0);
    if (c1 > LIM_ST_UCASE && c1 < LI_N_UCASE) {
        char c2 = LCASE[c1];
        if (c1 != c2) {
            c = s.toCharArray();
...
Stringuncapitalize(final String str)
Put first letter into lowercase
if (str.length() > 1) {
    return str.substring(0, 1).toLowerCase() + str.substring(1);
} else {
    return str.toUpperCase();
Stringuncapitalize(final String str)
uncapitalize
if (str == null || str.length() == 0) {
    return str;
return str.substring(0, 1).toLowerCase() + str.substring(1);
Stringuncapitalize(final 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;
char firstChar = str.charAt(0);
if (Character.isLowerCase(firstChar)) {
    return str;
return new StringBuilder(strLen).append(Character.toLowerCase(firstChar)).append(str.substring(1))
        .toString();
StringunCapitalize(String data, int pos)
un Capitalize
StringBuffer buf = new StringBuffer(data.length());
buf.append(data.substring(0, pos - 1));
buf.append(data.substring(pos - 1, pos).toLowerCase());
buf.append(data.substring(pos, data.length()));
return buf.toString();
Stringuncapitalize(String input)
lower cases the first letter
if (input == null || input.isEmpty())
    return input;
return input.substring(0, 1).toLowerCase() + input.substring(1);
Stringuncapitalize(String name)
uncapitalize
if (name == null || name.length() == 0) {
    return name;
char first = name.charAt(0);
if (first >= 65 && first <= 90) { 
    return Character.toLowerCase(first) + name.substring(1);
} else {
    return name;
...