Here you can find the source of decapitalizeFirstCharOfString(final String input)
Parameter | Description |
---|---|
input | the string to be processed; |
static String decapitalizeFirstCharOfString(final String input)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w .j a va 2 s. c o m * Decapitalizes first char of an input string. * * @param input the string to be processed; * @return The input string with the first capitalized char. Returns empty string, if passed input String is null or empty. */ static String decapitalizeFirstCharOfString(final String input) { if (input == null || input.length() == 0) { return ""; } else if (input.length() == 1) { return input.toLowerCase(); } else { return input.substring(0, 1).toLowerCase() + input.substring(1); } } }