titleCase()

Capitalizes the first letter of each word in a string. Also commonly known as toProperCase().

This function is valid in v2.0.0 to v2.14.0. This function has been downloaded 45 times.

Parameters

{string} str
The string which will be title cased.
{function(string, number, string)=} opt_fnFilter Optional
If specified, this function will be passed every word (along with the position and the original string) and should return true if the word should be title cased, otherwise false should be returned.

Returns

{string}
str with all of the 1st letter of each word capitalized (unless filtered out by opt_fnFilter).