Java String Lower Case toLowerCaseFirst(String str)

Here you can find the source of toLowerCaseFirst(String str)

Description

to Lower Case First

License

Apache License

Declaration

public static String toLowerCaseFirst(String str) 

Method Source Code

//package com.java2s;
/**//from   w ww.j  ava 2s  .com
 * Copyright (c) 2015 https://github.com/zhaohuatai
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */

public class Main {
    public static String toLowerCaseFirst(String str) {
        if (str == null || str.length() == 0) {
            return str;
        }
        String first = str.substring(0, 1).toLowerCase();
        String rest = str.substring(1, str.length());
        String newStr = new StringBuffer(first).append(rest).toString();
        return newStr;
    }
}

Related

  1. toLowerCase(StringBuffer buf)
  2. toLowerCase(StringBuffer buffer)
  3. toLowerCase0(String string)
  4. toLowerCaseAscii(String s)
  5. toLowerCaseFirst(String str)
  6. toLowerCaseFirst(String str)
  7. toLowerCaseFirst(String text)
  8. toLowerCaseFirst(String text)
  9. toLowerCaseFirstLetter(String str)