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