Java String Decapitalize decapitalize(String name)

Here you can find the source of decapitalize(String name)

Description

decapitalize

License

BSD License

Declaration

public static String decapitalize(String name) 

Method Source Code

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

public class Main {
    public static String decapitalize(String name) {
        if (name == null || name.isEmpty()) {
            return name;
        }//from   w w w .  j  av  a 2 s .co  m
        if (Character.isUpperCase(name.charAt(0))) {
            char chars[] = name.toCharArray();
            chars[0] = Character.toLowerCase(chars[0]);
            return new String(chars);
        } else {
            return name;
        }
    }
}

Related

  1. decapitalize(final String string)
  2. decapitalize(final String value)
  3. decapitalize(String name)
  4. decapitalize(String name)
  5. decapitalize(String name)
  6. decapitalize(String name)
  7. decapitalize(String name)
  8. deCapitalize(String noun)
  9. decapitalize(String s)