Here you can find the source of decapitalizeFirstLetter(final String str)
Parameter | Description |
---|---|
str | string for decapitalization. |
public static String decapitalizeFirstLetter(final String str)
//package com.java2s; /*//from w w w. j a va2s. co m * Copyright 2001-2008 Aqris Software AS. All rights reserved. * * This program is dual-licensed under both the Common Development * and Distribution License ("CDDL") and the GNU General Public * License ("GPL"). You may elect to use one or the other of these * licenses. */ public class Main { /** Utility method decapitalizes the first letter of string, used to * generate variable names from type name * @param str string for decapitalization. * @return string with the first letter decapitalized. */ public static String decapitalizeFirstLetter(final String str) { if (str == null || str.length() <= 0) { return str; } final char[] chars = str.toCharArray(); chars[0] = Character.toLowerCase(chars[0]); return new String(chars); } }