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

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

From php.net/ucwords: The definition of a word is any string of characters that is immediately after a whitespace (These are: space, form-feed, newline, carriage return, horizontal tab, and vertical tab).
См. также: http://php.net/ucwords
public static ucwords ( string $str, string $use_enc = null ) : string
$str string The input string.
$use_enc string The encoding to be used. If null, the internal encoding will be used.
Результат string The modified string.
    public static function ucwords($str, $use_enc = null)
    {
        $enc = self::$hab_enc;
        if ($use_enc !== null) {
            $enc = $use_enc;
        }
        if (self::$use_library == self::USE_MBSTRING) {
            $delimiters = array(chr(32), chr(12), chr(10), chr(13), chr(9), chr(11));
            // loop through the delimiters and explode the string by each one
            foreach ($delimiters as $d) {
                $pieces = explode($d, $str);
                for ($i = 0; $i < count($pieces); $i++) {
                    // capitalize each word
                    $pieces[$i] = self::ucfirst($pieces[$i], $enc);
                }
                // put the string back together
                $str = implode($d, $pieces);
            }
        } else {
            $str = ucwords($str);
        }
        return $str;
    }