note 104005 added to function.ucfirst
| From: | Quicker at osu1 dot php dot net | Date: | Tue, 17 May 2011 07:37:25 +0000 |
| Subject: | note 104005 added to function.ucfirst | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179775@lists.php.net to get a copy of this message | ||
UPDATE! The ucfirst_utf8 in my last reply returned just the first character, which does not match
the original ucfirst.
So here is the corrected one:
function ucfirst_utf8($stri){
if($stri{0}>="\xc3")
return (($stri{1}>="\xa0")?
($stri{0}.chr(ord($stri{1})-32)):
($stri{0}.$stri{1})).substr($stri,2);
else return ucfirst($stri);
}
Hope this helps anyway.
----
Server IP: 69.147.83.197
Probable Submitter: 92.201.254.160
----
Manual Page -- http://www.php.net/manual/en/function.ucfirst.php
Edit -- https://master.php.net/note/edit/104005
Del: integrated -- https://master.php.net/note/delete/104005/integrated
Del: useless -- https://master.php.net/note/delete/104005/useless
Del: bad code -- https://master.php.net/note/delete/104005/bad+code
Del: spam -- https://master.php.net/note/delete/104005/spam
Del: non-english -- https://master.php.net/note/delete/104005/non-english
Del: in docs -- https://master.php.net/note/delete/104005/in+docs
Del: other reasons-- https://master.php.net/note/delete/104005
Reject -- https://master.php.net/note/reject/104005
Search -- https://master.php.net/manage/user-notes.php