Here you can find the source of decapitalize(final String value)
public static String decapitalize(final String value)
//package com.java2s; //License from project: Apache License public class Main { public static String decapitalize(final String value) { String result = ""; boolean capitalize = false, isFirstLetter = true; for (final char c : value.toCharArray()) { final boolean isLetter = Character.isLetter(c); if (isLetter) { result += (!isFirstLetter && (capitalize || Character.isUpperCase(c))) ? Character.toUpperCase(c) : Character.toLowerCase(c); if (isFirstLetter) { isFirstLetter = false; }/*from www . j av a2 s . com*/ } capitalize = !isLetter; } return result; } }