There is no mb_ucfirst
function, as you've already noticed. You can fake a mb_ucfirst
with two mb_substr
:
function mb_ucfirst($string, $encoding)
{
$firstChar = mb_substr($string, 0, 1, $encoding);
$then = mb_substr($string, 1, null, $encoding);
return mb_strtoupper($firstChar, $encoding) . $then;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…