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 19:33:41 EST 2018


On 11/4/18 10:40 AM, Geoff Canyon via use-livecode wrote:
> I also added a "with overlaps" option.

My problem with the pWithOverlaps parameter is that is requires a priori 
knowledge of the data being consumed. If you already know there are 
overlaps then you'd set the parameter to true. If you don't know whether 
or not there are overlaps, then you'd need to set it to true so you 
don't miss anything (aside, of course, for the trivial case where you 
don't care whether or not there are overlaps - is there a use case for 
this?).

The only time you would set it to false is after you've already 
determined that there are no overlaps, and the time spent on that would 
probably more than offset the extra processing in the function.

-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list