Here you can find the source of decapitalize(String st)
Parameter | Description |
---|---|
st | a parameter |
public static String decapitalize(String st)
//package com.java2s; /*/*w ww . j av a 2s.c o m*/ * Copyright 2009 Pedro Oliveira * This file is part of Incerto. * * Incerto is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Incerto is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Incerto. If not, see <http://www.gnu.org/licenses/>. */ public class Main { /** * Decapitalize String * @param st * @return */ public static String decapitalize(String st) { if (st.length() == 0) return st; return st.substring(0, 1).toLowerCase() + st.substring(1); } }