What is string.lcfirst() in Perl?
The lcfirst() function converts the first character of a string to lowercase.
The figure below shows a visual representation of the lcfirst() function.
Syntax
lcfirst(string)
Parameters
The lcfirst() function requires a string whose first character is to be converted to lowercase.
Return value
The lcfirst() function converts the first character of a string to lowercase. The rest of the string stays the same.
If the
stringparameter is omitted, thenlcfirst()returns an empty string.
Code
#stringprint "lcfirst('EDUCATIVE') : ".lcfirst('EDUCATIVE'). "\n";#string with numberprint "lcfirst('EDUCAtIVE09') : ".lcfirst('EDUCAtIVE09'). "\n";#string is omittedprint "lcfirst() : ".lcfirst(). "\n";