Java Char Lower Case toLowerCaseFirstChar(String str)

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

Description

to Lower Case First Char

License

Open Source License

Declaration

public static String toLowerCaseFirstChar(String str) 

Method Source Code

//package com.java2s;

public class Main {

    public static String toLowerCaseFirstChar(String str) {
        if (str == null || str.length() == 0) {
            return null;
        }//w w  w.j a  v  a2 s . c  o  m

        if (Character.isLowerCase(str.charAt(0))) {
            return str;
        } else {
            return (new StringBuilder()).append(Character.toLowerCase(str.charAt(0))).append(str.substring(1))
                    .toString();
        }
    }
}

Related

  1. toLowerCase(final char c)
  2. toLowerCase(final char[] buffer, final int offset, final int limit)
  3. toLowerCase(int character_)
  4. toLowerCaseAtFirstChar(String string)
  5. toLowerCaseFirstChar(final String str)
  6. toLowerCaseFirstChar(String string)
  7. toLowercaseFirstCharacter(String s)
  8. toLowercaseFirstCharUppercase(final String string)
  9. toLowerCaseForFirstChar(String str)