Here you can find the source of toLowerCaseFirst(String str)
public static String toLowerCaseFirst(String str)
//package com.java2s; //License from project: Apache License public class Main { public static String toLowerCaseFirst(String str) { if (str == null) { return null; } else if (str.length() == 0) { return str; } else {/*from w w w .j a va 2s. c o m*/ String pre = String.valueOf(str.charAt(0)); return str.replaceFirst(pre, pre.toLowerCase()); } } public static String toLowerCase(String instr) { return instr == null ? instr : instr.toLowerCase(); } }