note 102076 deleted from function.ucfirst by peehaa
| From: | peehaa@php.net | Date: | Wed, 22 Feb 2017 09:23:47 +0000 |
| Subject: | note 102076 deleted from function.ucfirst by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208781@lists.php.net to get a copy of this message | ||
Note Submitter: chris at bjelleklang dot org
----
For those who want a multibyte-compliant ucfirst() without wanting to mess with encodings, this
should do the trick:
<?php
function mb_ucasefirst($str){
$str[0] = mb_strtoupper($str[0]);
return $str;
}
?>