Hi Joe,
to reverse a string you can use a crazy thing like this, putting it in
\define print-next(string:"",prefix:"",count:"")
<$macrocall $name="print-single-letters" string=<<__string__>> prefix=<<
__prefix__>> count=<<__count__>>/>
\end
\define print-single-letters(string:"",prefix:"",count:"0")
<$list filter="[<__string__>minlength[1]]">
<$set name="newcount" filter=" [range[0,100]after[$count$]]">
<$set name="printprefix" value={{{
[<__string__>splitbefore[]addprefix<__count__>] }}}>
<$set name="newstring" value={{{ [<__string__>removeprefix<__prefix__>] }}}>
<$text text=<<printprefix>>/>
<$list filter="[<newstring>minlength[1]]">
<$macrocall $name="print-next" string=<<newstring>> prefix={{{ [<newstring>
splitbefore[]] }}} count=<<newcount>>/>
</$list>
</$set>
</$set>
</$set>
</$list>
\end
\define range-enlist()
<$list filter="[range[0,$(length)$]reverse[]]">
<$set name="nnth" value={{{ [range[0,100]after<currentTiddler>] }}}>
<$list filter=
"[enlist[$(singleLetters)$]nth<nnth>removeprefix<currentTiddler>]">
<<currentTiddler>>
</$list>
</$set>
</$list>
\end
\define reverse-single-letters()
<$set name="length" filter="[enlist[$(singleLetters)$]] +[count[]]">
<<range-enlist>>
</$set>
\end
\define reverse-ma-string(string:"")
<$wikify name="singleLetters" text="""<$macrocall $name="print-single-
letters" string=<<__string__>> prefix={{{ [<__string__>splitbefore[]]
}}}/>""">
<$wikify name="reversedLetters" text=<<reverse-single-letters>>>
<<reversedLetters>>
</$wikify>
</$wikify>
\end
a tiddler tagged $:/tags/Macro and calling it from another tiddler with
<<reverse-ma-string"thisismystring">> or <$macrocall
$name="reverse-ma-string" string={{transcludethistiddler}}/>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/f39feba2-89e2-4781-a3fc-196624883c95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.