Again guys, thank you for your suggestions.
But finally I gave up using itemoffset and worked
with arrays instead, which is much much faster :
my script processes the 6 variables in less
than 15 secs.
___
use-livecode mailing list
use-livecode@list
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
mailto:use-livecode@lists.runrev.com>> wrote:
Hi,
I don't know if this wil
Hi,
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 tCh
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 6 variables to check, so I need my script to be as
fast as possible. I use "replace CR with TAB & CR & TAB in ...", but
How about a one-liner:
put wordOffset("incertain",myVar)
If the words ever have punctuation attached, use trueWordOffset.
On 11/14/22 6:51 AM, jbv via use-livecode wrote:
Hi list,
I have a variable with a content of 3 lines as follows :
1 sombre brun profond
2 flou incertain
3
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.
Alex.
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
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.
Bob S
On Nov 14, 2022, at 10:15 , Mike Kerner via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:
t
that still won't work if the text is the last item of a line.
in the example, below, i've taken his original, replaced the tabs with
commas, and for the purpose of being able to read what's going on,
substituted the cr for a backslash, and added a line to substitute it back
for the test.
*put*
"1,
Why not just use is among the items?
Bob S
> On Nov 14, 2022, at 04:51 , jbv via use-livecode
> wrote:
>
> Hi list,
>
> I have a variable with a content of 3 lines as follows :
> 1 sombre brunprofond
> 2 flouincertain
> 3 inexploré mystérieux inconnu
>
> The
the easy way to fix this problem:
replace cr with tab in myVar -- but if the line endings matter, this isn't
great
On Mon, Nov 14, 2022 at 9:00 AM Mike Kerner
wrote:
> you set the itemDelimiter to tab. the is part of the item.
>
--
On the first day, God created the heavens and the Earth
On
you set the itemDelimiter to tab. the is part of the item.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/us
11 matches
Mail list logo