Here you can find the source of decapitalize(String str)
public static String decapitalize(String str)
//package com.java2s; //License from project: Apache License public class Main { public static String decapitalize(String str) { if (isEmpty(str)) return str; char cs[] = str.toCharArray(); if (cs.length >= 2 && Character.isUpperCase(cs[0]) && Character.isUpperCase(cs[1])) return str; cs[0] = Character.toLowerCase(cs[0]); return new String(cs); }/*from w w w. ja v a 2 s . co m*/ public static boolean isEmpty(String str) { return str == null || str.length() == 0; } }