Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!


toTitleCase($wordsToSkip = default)


Title case every word (separated by whitespace).

Any word in the List of $wordsToSkip is excluded. By default it excludes a list of common English articles ('a', 'the', etc.)

'this is a title'.toTitleCase();
//= 'This is a Title'

'this is a title'.toTitleCase([]);
//= 'This Is A Title'

See Also