note 106089 added to function.ucfirst

From: Date: Sun, 09 Oct 2011 09:28:40 +0000
Subject: note 106089 added to function.ucfirst
Groups: php.notes 
Request: Send a blank email to php-notes+get-183743@lists.php.net to get a copy of this message
This must be usefull. This is fix for example here http://php.net/manual/en/function.ucfirst.php#102076. $str[0] is not correct for multybite strings. <?php function mb_ucfirst($str){ $str = mb_strtolower( $str ); $fc = mb_strtoupper( mb_substr($str, 0, 1) ); $str = $fc . mb_substr($str, 1); return $str; } ?> ---- Server IP: 195.54.192.44 Probable Submitter: 127.0.0.1 ---- Manual Page -- http://www.php.net/manual/en/function.ucfirst.php Edit -- https://master.php.net/note/edit/106089 Del: integrated -- https://master.php.net/note/delete/106089/integrated Del: useless -- https://master.php.net/note/delete/106089/useless Del: bad code -- https://master.php.net/note/delete/106089/bad+code Del: spam -- https://master.php.net/note/delete/106089/spam Del: non-english -- https://master.php.net/note/delete/106089/non-english Del: in docs -- https://master.php.net/note/delete/106089/in+docs Del: other reasons-- https://master.php.net/note/delete/106089 Reject -- https://master.php.net/note/reject/106089 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183743) next »