Java String Decapitalize decapitalize(String st)

Here you can find the source of decapitalize(String st)

Description

Decapitalize String

License

Open Source License

Parameter

Parameter Description
st a parameter

Declaration

public static String decapitalize(String st) 

Method Source Code

//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);
    }
}

Related

  1. decapitalize(String name)
  2. decapitalize(String name)
  3. deCapitalize(String noun)
  4. decapitalize(String s)
  5. decapitalize(String s)
  6. decapitalize(String str)
  7. decapitalize(String string)
  8. decapitalize(String string)
  9. decapitalize(String string)