public static String decapitalize(String name){
  if (name == null)   return null;
  if (name.length() == 0 || (name.length() > 1 && Character.isUpperCase(name.charAt(1)))) {
    return name;
  }
  char[] chars=name.toCharArray();
  chars[0]=Character.toLowerCase(chars[0]);
  return new String(chars);
}

public static String decapitalize ( String name ) { if ( name == null ) return null ; if ( name . length ( ) == 0 || ( name . length ( ) > 1 && Character . isUpperCase ( name . charAt ( 1 ) ) ) ) { return name ; } char [ ] chars = name . toCharArray ( ) ; chars [ 0 ] = Character . toLowerCase ( chars [ 0 ] ) ; return new String ( chars ) ; }
decapitalizes a given string according to the rule : < ul > < li > if the first or only character is upper case , it is made lower case < li > unless the second character is also upper case , when the string is returned unchanged < eul >
