ucwords

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Uppercase the first character of each word in a string
<?php ucwords(string $string, string $separators = " \t\r\n\f\v"): string
<?php         }



        if (! ctype_lower($value)) {

            $value = preg_replace('/\s+/u', '', ucwords($value));



            $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value));

        }
<?php {

    private function formatPropertyName(string $offset): string

    {

        return str_replace('_', '', lcfirst(ucwords($offset, '_')));

    }
<?php         $namespace = array_map(

            function ($part) {

                $part = Preg::replace('/[^a-z0-9]/i', ' ', $part);

                $part = ucwords($part);



                return str_replace(' ', '', $part);

            },
<?php     private function capitalizeHeaderName(string $name): string

    {

        $name = str_replace('-', ' ', $name);

        $name = ucwords($name);

        return str_replace(' ', '-', $name);

    }

}