Its on tiddlywiki.com as well and seems to have being around for a while.
If you look at the examples it allows you to replace one title with with another. The last example that shows today.
As this was possibly developed before split and join operators, I expect we have not explored the combination of these operators fully.
Split[] will split the input into characters removing space as a delimiter. You could then replace something and join it back together.
Regards
Tony
<$vars x=" a b ">{{{[<x>trim[]]}}}</$vars>\define triml(string) {{{ [<__string__>addsuffix[/]trim[]removesuffix[/]] }}}\define trimr(string) {{{ [<__string__>addprefix[/]trim[]removeprefix[/]] }}}Yes replace title not string. I remember a cobol statement called inspect that allowed both search and replace anything in a string without the complex minamilisium of regexe.
It would be a start if we could get split[] not to remove spaces, but I don't know how. Because a title can't be a space.
Regards
Tony