On Saturday, May 16, 2020 at 1:38:03 PM UTC-7, Tony K wrote:
>
> I'm unable to find the delimiter equivalent to \n in TW5
>
> Assuming I have a tiddler and I want to parse it line by line. Is it
> doable?
>
Here's a little example:
<$vars lf="
">
line count=<$count filter="[{SomeTiddler}split<lf>]"/><br>
<$list filter="[{SomeTiddler}split<lf>]" variable="thisline">
<<thisline>> ({{{ [<thisline>length[]] }}} chars)<br>
</$list>
</$vars>
The trick is to use $vars to define a variable ("lf") that contains a
*literal* newline (note the explicit line break in the code!)
You can then use <lf> in your filter syntax, as shown above.
enjoy,
-e
--
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/eeaa0100-fd52-48e9-8637-b30fb05f5fec%40googlegroups.com.