devondahon
1 month ago
182
7
Laravel

Capitalize first names

Posted 1 month ago by devondahon

Is there a method similar to Str::upper() and Str::title() which can convert first character of each word to upper case.

Examples:

catherine => Catherine
cAtHerinE => Catherine
mary catherine => Mary Catherine
mARy CAtherine => Mary Catherine
mary-catherine => Mary-Catherine

Please sign in or create an account to participate in this conversation.