Java Char Lower Case toLowerCaseAtFirstChar(String string)

Here you can find the source of toLowerCaseAtFirstChar(String string)

Description

to Lower Case At First Char

License

Open Source License

Declaration

public static String toLowerCaseAtFirstChar(String string) 

Method Source Code

//package com.java2s;
/**/*from   w  w  w . j  av a2  s . c om*/
 * Copyright (c) 2015 SK holdings Co., Ltd. All rights reserved.
 * This software is the confidential and proprietary information of SK holdings.
 * You shall not disclose such confidential information and shall use it only in
 * accordance with the terms of the license agreement you entered into with SK holdings.
 * (http://www.eclipse.org/legal/epl-v10.html)
 */

public class Main {

    public static String toLowerCaseAtFirstChar(String string) {
        if (isEmpty(string)) {
            return "";
        }

        StringBuffer buffer = new StringBuffer();

        buffer.append(string.substring(0, 1).toLowerCase());
        buffer.append(string.substring(1, string.length()));

        return buffer.toString();
    }

    public static boolean isEmpty(String string) {

        return string == null || string.equals("") ? true : false;
    }
}

Related

  1. toLowerCase(final char a)
  2. toLowerCase(final char a)
  3. toLowerCase(final char c)
  4. toLowerCase(final char[] buffer, final int offset, final int limit)
  5. toLowerCase(int character_)
  6. toLowerCaseFirstChar(final String str)
  7. toLowerCaseFirstChar(String str)
  8. toLowerCaseFirstChar(String string)
  9. toLowercaseFirstCharacter(String s)