note 104627 deleted from function.ucfirst by danbrown

From: Date: Mon, 27 Jun 2011 14:29:09 +0000
Subject: note 104627 deleted from function.ucfirst by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-180988@lists.php.net to get a copy of this message
Note Submitter: anatoly dot pashin at gmail dot com ---- Re: chris at bjelleklang dot org 26-Jan-2011 11:03 Your code works fine for NON-utf-8 strings. Tested on cyrillic, got error. Here is solution: <?php if ( ! function_exists( 'mb_ucfirst' ) ) { function mb_ucfirst( $string ) { return mb_strtoupper( mb_substr( $string , 0, 1 ) ) . mb_substr( $string , 1 ); } } ?>

« previous php.notes (#180988) next »