Here you can find the source of toLowerCaseFirstChar(final String str)
Parameter | Description |
---|---|
str | the string |
public static String toLowerCaseFirstChar(final String str)
//package com.java2s; /* ****************************************************************************** * Copyright (c) 2011 SouthEdge Software and Consultancy. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w ww. j a v a 2 s .c o m*/ * Carl Frendo - initial design and implementation * ******************************************************************************/ public class Main { /** * Method used to change to lower case the first character of a given string. * * @param str the string * @return str with the first character of the string in lower case. */ public static String toLowerCaseFirstChar(final String str) { String firstChar = str.substring(0, 1); firstChar = firstChar.toLowerCase(); String lastChars = str.substring(1, str.length()); return firstChar + lastChars; } }