I have stored a string with all capital letters. For instance “NEW YORK” or “EXAMPLE OF THE EXAMPLE” and what I want to do is to convert the first letter of each word into capital letters and the rest into lowercase letter so that:
“NEW YORK” → “New York”
“EXAMPLE OF THE EXAMPLE” → “Example Of The Example”
“HELLO THERE HI” → “Hello There Hi”
First convert the whole string to lower case and then
Use the below expression in write line, if you want to convert first letter of any string to capital letter.
Is there a simple way to do this but also keep capital letters in the middle of the word if they appear? Such as for a street name that could potentially be “123 McNamara Way”?
@jpreziuso You’d have to write a special case. Convert to Proper Case, then look for cases like McNamara (now Mcnamara Way) and change the “n” to an “N”
Right. But then I would have to iterate over the original string and look for any capital letters first and then remember their position in the string somehow after using proper case. Might be tough, but thanks!