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

Mark Wieder ahsoftware at sonic.net
Sun Nov 4 23:01:25 EST 2018


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




More information about the use-livecode mailing list