What exactly is the issue, as in looking at your screenshot, it seems to work as expected. Feel free to share your workflow to help demonstrate the problem.
Tip for sharing your workflow in the forum
Pasting your n8n workflow
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!
The only thing I can think of is there might be a hidden character at the start of the string. Can you try with other input and manually setting the summary value.
I have the same issue. Dealing with an all caps string that is a name and middle name combo. The description for .toTitleCase() says:
Changes the capitalization of the string to title case. The first letter of each word is capitalized and the others left unchanged. Short prepositions and conjunctions aren’t capitalized (e.g. ‘a’, ‘the’).
But the result is unchanged the the name is all caps.
This is the documentation here. It will not change uppercase letters. So what you are getting is the expected behaviour:
Formats a string to title case. Will not change already uppercase letters to prevent losing information from acronyms and trademarks such as iPhone or FAANG.
However, the following worked for me. If you first convert to all lowercase and then to title case.