I think this will do what you want: {{'DMXzone wappler'.replace(" ", " | ").camelize().replace("|", " ")}}
If used with dynamic data, you would have to make sure that the temporary separator (eg ‘|’), couldn’t appear in the data of course.
Hopefully there’s a better solution than this - eg it would be interesting to know if regular expressions can be used like this. They can be used in some situations in Wappler.
I wanted to use the formatter to format input value. What I do is on input key up, format the value. CSS only transform the text for display not the actual input value.
I have input mask scrip for that. I just don’t want to add extra script to the site if it is achievable just by using Wappler’s formatter. I remember the team was considering this type of formatter in my previous post but I cannot find the post any more to follow up.
I believe it was the PHP titlecase formatter that resulted in a different output then the other titleCase formatters.
"DMXzone wappler".titlecase() in PHP returns DMXzone Wappler, while in AppConnect and with ASP it returns Dmxzone Wappler.
I think the PHP is indeed better in this case, if nobody has anything against it then I will change the behavior of the titlecase to that of PHP. To get the old behavior back you can then change your expression to "DMXzone wappler".lowercase().titlecase().