PHP 8.4.1 Released!

mb_ucfirst

(PHP 8 >= 8.4.0)

mb_ucfirstMake a string's first character uppercase

Descripción

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.

Parámetros

string
The input string.
encoding
The string encoding.

Valores devueltos

Returns the resulting string.

Notas

Nota:

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/.

Ver también

  • mb_lcfirst() - Make a string's first character lowercase
  • mb_convert_case() - Realiza una conversión a mayúsculas/minúsculas de un string
  • ucfirst() - Convierte el primer caracter de una cadena a mayúsculas
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top