We also have trim, like
<$vars x=" a b ">
{{{
[<x>trim[]]
}}}
</$vars>
The triml and trimr can be written as below
\define triml(string) {{{ [<__string__>addsuffix[|]trim[]removesuffix[|]]
}}}
\define trimr(string) {{{ [<__string__>addprefix[|]trim[]removeprefix[|]]
}}}
The only issue is TW condenses the space into one. for example if you give
[ a b ], trim returns [a b]
and I think this is okay in most cases.
--Mohammad
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/82bc1c47-f482-4623-babe-71c73b2f32aa%40googlegroups.com.