note 84122 added to function.ucfirst
| From: | prokur dot net-thereismyemail at osu1 dot php dot net | Date: | Sun, 29 Jun 2008 22:01:13 +0000 |
| Subject: | note 84122 added to function.ucfirst | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140990@lists.php.net to get a copy of this message | ||
I believe that mb_ucfirst will be soon added in PHP, but for now this could be useful
<?php
if (!function_exists('mb_ucfirst') && function_exists('mb_substr')) {
function mb_ucfirst($string) {
$string = mb_strtoupper(mb_substr($string, 0, 1)) . mb_substr($string, 1);
return $string;
}
}
?>
it also check is mb support enabled or not
----
Server IP: 81.94.227.69
Probable Submitter: 89.191.108.2
----
Manual Page -- http://www.php.net/manual/en/function.ucfirst.php
Edit -- https://master.php.net/note/edit/84122
Del: integrated -- https://master.php.net/note/delete/84122/integrated
Del: useless -- https://master.php.net/note/delete/84122/useless
Del: bad code -- https://master.php.net/note/delete/84122/bad+code
Del: spam -- https://master.php.net/note/delete/84122/spam
Del: non-english -- https://master.php.net/note/delete/84122/non-english
Del: in docs -- https://master.php.net/note/delete/84122/in+docs
Del: other reasons-- https://master.php.net/note/delete/84122
Reject -- https://master.php.net/note/reject/84122
Search -- https://master.php.net/manage/user-notes.php