Oh dear - answering my own posts .... rarely a good sign :-)


On 03/11/2018 02:10, Alex Tweedly via use-livecode wrote:

On 03/11/2018 00:43, Geoff Canyon via use-livecode wrote:
One thing I don't see how to do without significantly impacting performance
is to return all offsets if there are overlapping strings. For example:

allOffsets("aba","abababa")

would return 1,5, when it might be reasonable to expect it to return 1,3,5.
Using the offset function with numToSkip would make that easy; adapting
allOffsets to do so would be harder to do cleanly I think.

Can I suggest changing it to "someOffsets()" :-) :-)

But seriously, can you not iteratively run "allofsets" ?

Answer : NO. That doesn't work.
However, there is a more efficient way that does work - but it needs to be tested before I post it.

-- Alex.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to