Java String Uncapitalize unCapitalize(String str)

Here you can find the source of unCapitalize(String str)

Description

un Capitalize

License

Apache License

Declaration

private static String unCapitalize(String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static String unCapitalize(String str) {
        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 {/*from  ww w . j a va  2  s.  c  o  m*/
            return str;
        }
    }
}

Related

  1. uncapitalize(String str)
  2. uncapitalize(String str)
  3. uncapitalize(String str)
  4. uncapitalize(String str)
  5. uncapitalize(String str)
  6. uncapitalize(String str)
  7. uncapitalize(String str)
  8. uncapitalize(String str)
  9. uncapitalize(String string)