當前位置: 首頁> 函數類別大全> lcfirst

lcfirst

將字符串的第一個字符設為小寫
名稱:lcfirst
分類:字符串
所屬語言:php
一句話介紹:把字符串的首字符轉換為小寫。

實例

把"Hello" 的首字符轉換為小寫:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">lcfirst</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"Hello world!"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

親自試一試

同類函數
  • 計算給定文件的md5哈希值 md5_file

    md5_file

    計算給定文件的md5哈希值
  • 查找字符串的首次出現 strstr

    strstr

    查找字符串的首次出現
  • 計算字符串中全部字符都存在於指定字符集合中的第一段子串的長度 strspn

    strspn

    計算字符串中全部字符都存在於指定字符集合
  • 查詢語言和區域設置信息 nl_langinfo

    nl_langinfo

    查詢語言和區域設置信息
  • 使用“自然順序”算法進行字符串比較 strnatcmp

    strnatcmp

    使用“自然順序”算法進行字符串比較
  • 從字符串中刪除HTML和PHP標記 strip_tags

    strip_tags

    從字符串中刪除HTML和PHP標記
  • 使用另一個字符串將字符串填充到某個長度 str_pad

    str_pad

    使用另一個字符串將字符串填充到某個長度
  • 計算指定字符串在目標字符串中最後一次出現的位置(不區分大小寫) strripos

    strripos

    計算指定字符串在目標字符串中最後一次出現