Forum Discussion

jervin's avatar
jervin
New Contributor III
5 years ago
Solved

Capitalize First Letter of Every Word in a String

Is there a good way to capitalize the first letter of every word in a string with the rest lowercase natively in a Mapper or other snap?

For example:
fort worth => Fort Worth
SAN ANTONIO => San Antonio

I see the upperFirst() and capitalize() functions but they only work on the first character in the string, not every word.