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.24.2. This function has been downloaded 57 times.


{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.


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