note 102648 deleted from function.ucfirst by danbrown

[email protected] Sat, 26 Feb 2011 08:58:39 -0800
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: jsonx 

----

<?php
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, -1, 'utf-8');
    }

    return ucfirst($str);
}
?>