cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Capitalize First Letter of Every Word in a String

jervin
New Contributor III

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.

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@jervin

Please find the attached simple pipeline:

SL_Test_2020_12_03 (1).slp (3.6 KB)

Hope this helps.

View solution in original post

2 REPLIES 2

SpiroTaleski
Valued Contributor

@jervin

Please find the attached simple pipeline:

SL_Test_2020_12_03 (1).slp (3.6 KB)

Hope this helps.

jervin
New Contributor III

Yes that works perfectly! Thank you @Spiro_Taleski