src/Traits/Strings.php
public static function upperCase(string $input): string
    {
        $words = __::words(preg_replace("/['\x{2019}]/u", '', $input));

        return array_reduce(
            $words,
            function ($result, $word) use ($words) {
                $isFirst = __::first($words) === $word;

                return $result . (!$isFirst ? ' ' : '') . __::toUpper($word);
            },
            ''
        );
    }
public static function upperCase(string $input): string
    {
        $words = __::words(preg_replace("/['\x{2019}]/u", '', $input));

        return array_reduce(
            $words,
            function ($result, $word) use ($words) {
                $isFirst = __::first($words) === $word;

                return $result . (!$isFirst ? ' ' : '') . __::toUpper($word);
            },
            ''
        );
    }
public static function upperCase ( string $ input ) : string { $ words = __ :: words ( preg_replace ( "/['\x{2019}]/u" , '' , $ input ) ) ; return array_reduce ( $ words , function ( $ result , $ word ) use ( $ words ) { $ isFirst = __ :: first ( $ words ) === $ word ; return $ result . ( ! $ isFirst ? ' ' : '' ) . __ :: toUpper ( $ word ) ; } , '' ) ; }
Converts string, as space separated words, to upper case.

@usage __::upperCase('--foo-bar');
>> 'FOO BAR'

@param string $input

@return string
Converts string as space separated words to upper case .