Closed BurningTreeC closed 5 years ago
IMO the question you link to doesn't at all require the proposal you suggest here. (I answered the fella there with a more direct solution).
That said, I think we do need a lot more string manipulation filter ops. Could you give more use cases for your proposal here?
@twMat thanks for answering
IMO the question you link to doesn't at all require the proposal you suggest here. (I answered the fella there with a more direct solution).
I wouldn't say at all
in this case neither ... If we don't know the ending character of a title but want it to be red
nevertheless, we need to split it off from the title, wrap it within a span
or div
or whatever and set its css color property to red
Fair enuf.
But, mostly from curiosity, can you give more examples of when one would need to split up the content into an array of individual characters?
@twMat I wanted to make something like spritzinc.com some time ago using the timer plugin made by @EvanBalster - that's one example for what such a filter could be useful ... another idea would be an input field that resizes with the input text-length, as I've made at outlineproto.tiddlyspot.com (the outliner view is the use-case) ... the filter used there is very primitive and not considerable here
@BurningTreeC - interesting stuff. If you haven't already, do check out @tobibeer 's split
The method to split is closely related to https://github.com/Jermolene/TiddlyWiki5/issues/3457 which is about string search and replace. There could be a mechanism to output the result as a single string or individual characters after the operation
Eg Input 2018-10-17
Replace "-" with "" string 20181017
Replace "-" with "" character output 2 0 1 8 1 0 1 7
And it would be nice if there was a way to accept a multiline test field and output a line at a time. This would allow detailed line by line manipulation and possible programmatic search and replace text.
Post Script, Line by Line manipulation would allow text sorting of content in a text field.
with 5.1.18 I'm able to split titles and text into single characters, see:
It's a wikitext macro that splits strings into single characters ... it inverses the string, too, and puts the single characters back together, but that's just further processing
Do you think I can close this issue?
Hi @BurningTreeC that's a localhost URL...
BTC Having opened this issue and obtaining the result you requested, It would be fair for you to close it, but as a result of this request I was hoping a search and replace character or split by line. Once you correct the link as per Jeremy, I will have a look if I can use what you have created. Tony
Sorry , here's the right URL
As of 9b2d527, this can be done with the split operator.
There's a question in the google group and I've also encountered similar problems in the past, where there would be the need for a filter that splits an input title into an array of characters, so that we can modify it further
A simple filter that splits the title, like
return title.split('')
would already do it I think