rant: truewordOffset

Mark Wieder ahsoftware at sonic.net
Tue Apr 20 12:21:16 EDT 2021


On 4/20/21 9:12 AM, Mark Waddingham via use-livecode wrote:

> Works fine here too:
> 
> set the wholeMatches to true
> put trueWordOffset("BT", "foo btn")
>    => 0
> 
> set the wholeMatches to false
> put trueWordOffset("BT", "foo btn")
>    => 2
> 
> Warmest Regards,
> 
> Mark.
> 
> P.S. Remember wholeMatches is a handler-local property not global - I 
> only mention that because it sounds like it isn't actually the value you 
> think when you are calling trueWordOffset.
> 

nvm.
Actually this was a side effect of another function.

The truewordOffset function is indeed doing what it should, and I'm 
quite relieved to find that this was just an error in my own code.

-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list