Habari\MultiByte::lcfirst PHP Метод

lcfirst() публичный статический Метод

Makes a string's first character lowercase
См. также: http://php.net/ucfirst
public static lcfirst ( string $str, string $use_enc = null ) : string
$str string The string to lowercase.
$use_enc string The encoding to be used. If null, the internal encoding will be used.
Результат string The lowercased string.
    public static function lcfirst($str, $use_enc = null)
    {
        $enc = self::$hab_enc;
        if ($use_enc !== null) {
            $enc = $use_enc;
        }
        if (self::$use_library == self::USE_MBSTRING) {
            // get the first character
            $first = self::substr($str, 0, 1, $enc);
            // lowercase it
            $first = self::strtolower($first, $enc);
            // get the rest of the characters
            $last = self::substr($str, 1, null, $enc);
            // put them back together
            $ret = $first . $last;
        } else {
            // lcfirst() is php 5.3+ so we'll emulate it
            $first = substr($str, 0, 1);
            $first = strtolower($first);
            $last = substr($str, 1);
            $ret = $first . $last;
        }
        return $ret;
    }