note 106089 deleted from function.ucfirst by danbrown

From: Date: Mon, 10 Oct 2011 15:47:08 +0000
Subject: note 106089 deleted from function.ucfirst by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183771@lists.php.net to get a copy of this message
Note Submitter: pk at weportnoy dot ru ---- 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; } ?>

« previous php.notes (#183771) next »