note 102649 added to function.ucfirst
| From: | jsonx at osu1 dot php dot net | Date: | Sat, 26 Feb 2011 10:25:36 +0000 |
| Subject: | note 102649 added to function.ucfirst | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177349@lists.php.net to get a copy of this message | ||
<?php
//sorry mb_substr($str, 1, - 1, 'utf-8') must be mb_substr($str, 1, (mb_strlen($str,
'utf-8') - 1), 'utf-8')
function mb_ucfirst($str) {
if (function_exists('mb_strtoupper')) {
return mb_strtoupper(mb_substr($str, 0, 1, 'utf-8'), 'utf-8') .
mb_substr($str, 1, (mb_strlen($str, 'utf-8') - 1), 'utf-8');
}
return ucfirst($str);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 88.226.193.132
----
Manual Page -- http://www.php.net/manual/en/function.ucfirst.php
Edit -- https://master.php.net/note/edit/102649
Del: integrated -- https://master.php.net/note/delete/102649/integrated
Del: useless -- https://master.php.net/note/delete/102649/useless
Del: bad code -- https://master.php.net/note/delete/102649/bad+code
Del: spam -- https://master.php.net/note/delete/102649/spam
Del: non-english -- https://master.php.net/note/delete/102649/non-english
Del: in docs -- https://master.php.net/note/delete/102649/in+docs
Del: other reasons-- https://master.php.net/note/delete/102649
Reject -- https://master.php.net/note/reject/102649
Search -- https://master.php.net/manage/user-notes.php