PHP lcfirst() 函数

PHP lcfirst() 函数

PHP String 函数

实例

把 "Hello" 的首字符转换为小写:

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

运行实例

定义和用法

lcfirst() 函数把字符串中的首字符转换为小写。

相关函数:

  • strtolower() 函数") - 把字符串转换为小写
  • strtoupper() 函数") - 把字符串转换为大写
  • ucfirst() 函数") - 把字符串中的首字符转换为大写
  • ucwords() 函数") - 把字符串中每个单词的首字符转换为大写

语法

lcfirst(_string_)

参数

描述

string

必需。规定要转换的字符串。

技术细节

返回值:

返回已转换的字符串。

PHP 版本:

5.3.0+

PHP String 函数


原网址: 访问
创建于: 2019-04-06 17:52:34
目录: default
标签: 无

请先后发表评论
  • 最新评论
  • 总共0条评论