Here you can find the source of decapitalize(String string)
public static String decapitalize(String string)
//package com.java2s; /* Copyright (c) 2008 Charles Rich and Worcester Polytechnic Institute. * All Rights Reserved. Use is subject to license terms. See the file * "license.terms" for information on usage and redistribution of this * file and for a DISCLAIMER OF ALL WARRANTIES. *///www .j a v a 2 s .c o m public class Main { /** * Return (possibly copy of) given string with first character lower case. */ public static String decapitalize(String string) { if (Character.isLowerCase(string.charAt(0))) return string; char chars[] = string.toCharArray(); chars[0] = Character.toLowerCase(chars[0]); return new String(chars); } }