How to find the offset of the last instance of a repeating character in a string? (Geoff Canyon)

Brian Milby brian at milby7.com
Sun Nov 4 23:07:13 EST 2018


I’m working on an update to the stack now. Moving buttons to the left side to make it easier to add more.

Thanks,
Brian
On Nov 4, 2018, 10:02 PM -0600, Mark Wieder via use-livecode <use-livecode at lists.runrev.com>, wrote:
> On 11/4/18 4:45 PM, Brian Milby via use-livecode wrote:
> > My updated solution always looks for overlap but if none are found it uses optimized versions of the search (private functions instead of inside the main function). I special case for no overlap and a single overlap in the delimiter. It is about the same speed as Geoff’s.
>
> Nice. I tried to get tricky and replace that 'replace with' loop with a
> 'repeat for each' loop, but ended up about 20% slower. Not at all what I
> expected.
>
> --
> Mark Wieder
> ahsoftware at gmail.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the Use-livecode mailing list