useful little tip

Ken Ray kray at sonsothunder.com
Sat May 14 16:38:23 EDT 2005


On 5/14/05 7:35 AM, "jbv" <jbv.silences at Club-Internet.fr> wrote:

> well, nothing really new, but let's say you have a sentence
> featuring several words, and you need to know if the same
> word W1 occurs more than once in that sentence.
>     for instance : W1 W2 W3 W4 W5 W1 W6 W7
> 
> The following line is a very simple & fast way to know it :
> 
> if wordoffset(W1,myString,wordoffset(W1,myString)) > 0
> 
> of course, it also works with offset, itemoffset and lineoffset.

Very smart, JB! Nicely done!


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list