Here you can find the source of uncapitalize(String string)
Parameter | Description |
---|---|
string | the String to be processed |
public static String uncapitalize(String string)
//package com.java2s; public class Main { /**/* ww w . ja va2s .c om*/ * Returns the specified string with its first character converted to * lower case. * * @param string the String to be processed * @return the specified string with its first character converted to * lower case */ public static String uncapitalize(String string) { int length = string.length(); if (length == 0) { return string; } else if (length == 1) { return string.toLowerCase(); } else { return (Character.toLowerCase(string.charAt(0)) + string.substring(1)); } } }