> Alex T. wrote: > > put 0 into tOffset > repeat for each trueWord W in tSource > add 1 to tOffset > if W = myWord then > put tOffset & comma after tOffsetList > end if > end repeat
This is (whether trueWord or word chunks used) probably the fastest method for an offset counting of one (true)word. Possibly it is for a large tSource (say 4 MByte) better to use CR instead of comma as delimiter for the list: Else, when putting tOffsetList into a field, LC may cut the result or even hang (LC 9) because the maximum pixel size of a line gets exceeded. _______________________________________________ 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/use-livecode