itemoffset & wholematches

Bob Sneidar bobsneidar at
Tue Nov 15 11:11:15 EST 2022

If the data always contains the same number of items, I again highly recommend pushing everything to a memory based sqLite file then doing queries on it.

Bob S

On Nov 15, 2022, at 04:50 , Alex Tweedly via use-livecode <use-livecode at<mailto:use-livecode at>> wrote:


I don't know if this will be faster, slower, or what !?! Something like ....

  put myVar into tCopy
  replace CR with TAB in tCopy

  put itemoffset("incertain", tCopy) into tmp
  put the number of chars in item 1 to (tmp-1) of tCopy into tCharCount
  put the number of items in char 1 to tCharCount of myVar into theRealAnswer

Or, depending on what you do next, just go on using charOffset rather than itemOffset for the following code.


On 15/11/2022 09:33, jbv via use-livecode wrote:
Hi guys,
Thank you all for your answers.

Actually I thought that some "hierarchy"remained (items inside lines)
when using itemoffset, but obviously I was wrong.
I have about 60000 variables to check, so I need my script to be as
fast as possible. I use "replace CR with TAB & CR & TAB in ...", but
as I need to get the exact itemoffset digit, I also need to count
how many items I have added and substract that number from the
result, which is quite cumbersome and slow...

To Jacqueline :
Thanks fro the suggestion, but I have to stick with items and
itemoffset, for some items can contain more that 1 word, like
"pied de biche"...

Le 2022-11-14 14:45, Alex Tweedly via use-livecode a écrit :
That would deal with the last item in a line - but not the first.

Should do

   replace CR with TAB & CR & TAB in ...

and reverse later if needed.


On 14/11/2022 18:43, Bob Sneidar via use-livecode wrote:
oic. Odd use case. I suppose a lineOffset function followed by is among the items could be used. If he needs the lines to remain intact he could also replace cr with tab & cr first.

use-livecode mailing list
use-livecode at<mailto:use-livecode at>
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list