當前位置: 首頁> 函數類別大全> 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>

親自試一試

同類函數
  • 標記分割字符串 strtok

    strtok

    標記分割字符串
  • 二進制安全比較字符串開頭的若干個字符 strncmp

    strncmp

    二進制安全比較字符串開頭的若干個字符
  • 返回格式化的字符串 vsprintf

    vsprintf

    返回格式化的字符串
  • 將格式化的字符串寫入流 vfprintf

    vfprintf

    將格式化的字符串寫入流
  • 將格式化後的字符串寫入到流 fprintf

    fprintf

    將格式化後的字符串寫入到流
  • 重複一個字符串 str_repeat

    str_repeat

    重複一個字符串
  • 使用“自然順序”算法進行字符串比較 strnatcmp

    strnatcmp

    使用“自然順序”算法進行字符串比較
  • 計算兩個字符串之間的相似性 similar_text

    similar_text

    計算兩個字符串之間的相似性