It seems there isn't such a function in TW core. But, is it possible (for someone who knows how to do it) to write a substring js macro.
The javascript is this: var str = "Hello world!"; var res = str.substring(x, y); so <$macrocall $name="substring" string="Hello,World" x="1" y="5"/> would return "Hello". ...which is well beyond my skills (my first attempt generated java script error, and forced me to jump through some hoops to delete the tiddler, as it was hidden behind the red screen of death... On Friday, March 17, 2017 at 5:13:00 PM UTC-4, stevesuny wrote: > > Hi, > > this topic seems to have come up before, but without a clear answer. > > How do I define a substring with the first x characters of a tiddler name? > > If I have $tiddler$ named "01 01 Long name of tiddler" (those are spaces) > I'd like to be extract "01 01" to <<short-name>> so I can write <$link > to="$tiddler$><<short-name>></$link> to display "01 01" as a link. > > Thanks! > > (It seems I could play with prefix, but I kind of messed up with my > tiddler names by having two spaces, so I can't make a prefix of the first > five characters...) > > //steve. > > > -- 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/40972a21-f508-4c8e-95b1-856ebab0fa23%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

