I just found string operators in documentation, finally. 😅 I will try those out now, and came back here if I have any questions. 😅
On Thursday, January 26, 2017 at 1:54:51 AM UTC-8, Penguinlay wrote: > > With JS or C++, I used to split the data strings in an array, and > manipulate with the result to sort the strings that end with numbers. > For example, if I have an array of strings with all entries starting with > the same characters like: > ["Integer = 1", "Integer = 2", "Integer = 3"], then I would split each > entry string and sort by the number. > > I want to do the same thing with tiddler title, field, etc. Right now, I > need that feature for two usages. > > *First Usage* > The same reasons I did with JS and C++. I have tiddlers titled similar to > the entries in the above array. And, when I sort those after filter > normally, nsort and sort does not work because it is not intended for this, > and they sort regardless of meaning. > One way of workaround here is to name the titles including numbers not as > prefix by adding leading zeros in all numbers. However, I am basically, > writing data for each integers in my math notebooks, and the integers can > be a million or a billion. So, it is not realistic to do so. > > *Second Usage* > I have a macro that detect whether current tiddler is an orphan, and if it > is not, then add a warning to view template along with button that opens > all those tiddlers that have hard link(s) to current tiddler. That macro > works fine in view template of all the tiddlers that I created (I don't > know what's wrong exactly, but it did not work on system macro as the > warning is showing on all the system tiddlers whether it is orphan or not; > I think probably because orphans operator does not work on system tiddlers. > Anyway, this thread is not about this macro so that I started a new thread > for that case.) > I want to use the exact same macro on the exact same set of tiddlers, also > in their edit templates. However, I can't reference to the title of current > tiddler apparently because when I edit, draft tiddler is a separate tiddler > with new name getting by prefixing with "Draft of". So, my intention is to > split the title by removing "Draft of" from result of currentTiddler > variable and use the result in my macro. (Or, at least, that's what I am > thinking of. I am not sure if it works because draft tiddler's title might > not be as simple as I thought.) Basically, it is to remind myself to change > all the hard links before changing a tiddler's title. > > So, how to manipulate the title, field, etc. within the capacity of what > is available on official TW? Or, alternately, what is the best way to do > those? I know I can always write custom JS macro or custom operator for > filters or hacks into core packages but I don't know how to do it yet. So, > for now, I am trying to make-do with whatever is come with TW officially. > -- 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/fa824385-dcb0-4e67-bca5-5b59f4900859%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

