Version: v0.7.1 - Beta.  We welcome contributors & feedback.

String.titleCase

titleCase($listOfSkipWords = default) -> string

Description

Title case every word (separated by whitespace).

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

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

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

See Also