|
|
|
@ -6,6 +6,16 @@ namespace jrosset;
|
|
|
|
|
* Class for “missing” mbstring functions
|
|
|
|
|
*/
|
|
|
|
|
final class MbstringExtended {
|
|
|
|
|
/**
|
|
|
|
|
* Multi-bytes implementation for {@see https://www.php.net/manual/function.ucfirst.php ucfirst}
|
|
|
|
|
*
|
|
|
|
|
* @param string $string The input string
|
|
|
|
|
*
|
|
|
|
|
* @return string The resulting string
|
|
|
|
|
*/
|
|
|
|
|
public static function ucfirst (string $string): string {
|
|
|
|
|
return mb_strtoupper(mb_substr($string, 0, 1)) . mb_strtolower(mb_substr($string, 1));
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Multi-bytes implementation for {@see https://www.php.net/manual/function.str-pad.php str_pad}
|
|
|
|
|
*
|
|
|
|
|