Java String Uncapitalize uncapitalize(String str)

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

Description

uncapitalize

License

Open Source License

Declaration

public static String uncapitalize(String str) 

Method Source Code

//package com.java2s;

public class Main {
    public static String uncapitalize(String str) {
        return changeFirstCharacterCase(str, false);
    }/*from  w  w w.  j a  va 2 s.  c  om*/

    private static String changeFirstCharacterCase(String str, boolean capitalize) {
        if (str == null || str.length() == 0) {
            return str;
        }
        StringBuffer buf = new StringBuffer(str.length());
        if (capitalize) {
            buf.append(Character.toUpperCase(str.charAt(0)));
        } else {
            buf.append(Character.toLowerCase(str.charAt(0)));
        }
        buf.append(str.substring(1));
        return buf.toString();
    }
}

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 string)
  9. unCapitalize(String string)