PHP 8.1.31 Released!

mb_ucfirst

(PHP 8 >= 8.4.0)

mb_ucfirstMake a string's first character uppercase

说明

mb_ucfirst(string $string, string $encoding = null): string

Performs a multi-byte safe ucfirst() operation, and returns a string with the first character of string title-cased.

参数

string
The input string.
encoding
The string encoding.

返回值

Returns the resulting string.

注释

注意:

By contrast to the standard case folding functions such as strtolower() and strtoupper(), case folding is performed on the basis of the Unicode character properties. Thus the behaviour of this function is not affected by locale settings and it can convert any characters that have 'alphabetic' property, such a-umlaut (ä).

For more information about the Unicode properties, please see » http://www.unicode.org/reports/tr21/.

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top