Java String Lower Case toLowerCaseFirst(String str)

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

Description

to Lower Case First

License

Apache License

Declaration

public static String toLowerCaseFirst(String str) 

Method Source Code

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

public class Main {
    public static String toLowerCaseFirst(String str) {
        if (str == null) {
            return null;
        } else if (str.length() == 0) {
            return str;
        } else {/*from   w  w  w .j  a  va  2s.  c  o m*/
            String pre = String.valueOf(str.charAt(0));
            return str.replaceFirst(pre, pre.toLowerCase());
        }
    }

    public static String toLowerCase(String instr) {
        return instr == null ? instr : instr.toLowerCase();
    }
}

Related

  1. toLowerCase(StringBuffer buffer)
  2. toLowerCase0(String string)
  3. toLowerCaseAscii(String s)
  4. toLowerCaseFirst(String str)
  5. toLowerCaseFirst(String str)
  6. toLowerCaseFirst(String text)
  7. toLowerCaseFirst(String text)
  8. toLowerCaseFirstLetter(String str)
  9. toLowercaseFirstLetter(String str)