Here you can find the source of uncapitalize(String str)
public static String uncapitalize(String str)
//package com.java2s; //License from project: Mozilla Public License public class Main { public static String uncapitalize(String str) { return uncapitalize(str, null); }/*w w w . ja v a2s . c o m*/ public static String uncapitalize(String str, char[] delimiters) { int delimLen = (delimiters == null ? -1 : delimiters.length); if (str == null || str.length() == 0 || delimLen == 0) { return str; } int strLen = str.length(); StringBuilder buffer = new StringBuilder(strLen); boolean uncapitalizeNext = true; for (int i = 0; i < strLen; i++) { char ch = str.charAt(i); if (isDelimiter(ch, delimiters)) { buffer.append(ch); uncapitalizeNext = true; } else if (uncapitalizeNext) { buffer.append(Character.toLowerCase(ch)); uncapitalizeNext = false; } else { buffer.append(ch); } } return buffer.toString(); } private static boolean isDelimiter(char ch, char[] delimiters) { if (delimiters == null) { return Character.isWhitespace(ch); } for (int i = 0, isize = delimiters.length; i < isize; i++) { if (ch == delimiters[i]) { return true; } } return false; } }