I need a function that capitalizes first letter (not a symbol/character) of each word. In this case I would like to use some custom function similar to ucwords().
For example, this works perfectly:
// returns: This Works Perfectly
ucwords( 'this works perfectly' );
But this one fails:
// returns: This Works Perfectly (or "maybe Not" Always)
// i want a function which returns: This Works Perfectly (Or "Maybe Not" Always)
ucwords( 'this works perfectly (or "maybe not" always)' );
The thing is that
(or
and
"maybe
are not capitalised, but I need it to be capitalised. Does someone have a custom function for that?
Thank you in advance!