Toolbox::ucfirst PHP Méthode

ucfirst() static public méthode

Convert first caracter in upper
static public ucfirst ( $str ) : string
$str string to change
Résultat string changed
    static function ucfirst($str)
    {
        if ($str[0] >= "Ã") {
            return ($str[1] >= " " ? $str[0] . chr(ord($str[1]) - 32) : $str[0] . $str[1]) . substr($str, 2);
        }
        return ucfirst($str);
    }

Usage Example

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     return;
     if ($item->getType() == 'PluginCustomTab' && $item->canView()) {
         return Toolbox::ucfirst(_n("Profile", "Profiles", 1));
     }
     return '';
 }
All Usage Examples Of Toolbox::ucfirst