Current Location: Home> Function Categories> lcfirst

lcfirst

Set the first character of the string to lowercase
Name:lcfirst
Category:String
Programming Language:php
One-line Description:Converts the first character of the string to lowercase.

Definition and usage

The lcfirst() function converts the first character in the string to lowercase.

Related functions:

  • strtolower() - Convert strings to lowercase
  • strtoupper() - Convert string to uppercase
  • ucfirst() - Convert the first character in a string to uppercase
  • ucwords() - Convert the first character of each word in a string to uppercase

Example

Convert the first character of "Hello" to lowercase:

 <?php
echo lcfirst ( "Hello world!" ) ;
?>

Try it yourself

grammar

 lcfirst ( string )
parameter describe
string Required. Specifies the string to be converted.
Similar Functions
  • Binary safe case-insensitive string comparison strcasecmp

    strcasecmp

    Binarysafecase-insen
  • Write formatted strings to stream vfprintf

    vfprintf

    Writeformattedstring
  • Find the first occurrence of a string strstr

    strstr

    Findthefirstoccurren
  • Returns the formatted string vsprintf

    vsprintf

    Returnstheformatteds
  • Alias ​​of implode join

    join

    Alias​​ofimplode
  • Insert HTML newline tag before all new lines of a string nl2br

    nl2br

    InsertHTMLnewlinetag
  • Calculate the metaphone key of a string metaphone

    metaphone

    Calculatethemetaphon
  • Write the formatted string to the stream fprintf

    fprintf

    Writetheformattedstr
Popular Articles