rant: truewordOffset
Mark Waddingham
mark at livecode.com
Tue Apr 20 12:12:58 EDT 2021
On 2021-04-20 17:04, Mark Wieder via use-livecode wrote:
> On 4/20/21 6:00 AM, Niggemann, Bernd via use-livecode wrote:
>> Mark Wieder wrote
>> You can't just say
>>
>> put truewordOffset("font", tText) into tOffset
>> because it might encounter "fontTable" first.
>>
>>
>> If I set wholematches to true it works for me
>
> Unfortunately not here. Even with wholematches true
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.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list