On 11/29/06 4:31 PM, "Brian Yennie" <[EMAIL PROTECTED]> wrote:
> I do think that algorithmically
> one-pass is definitely possible. You just need to pass through the
> text once, and "cross off" each word as you find it. If everything is
> crossed off when you're done, then you're done =).
Good idea, Brian.
-- Dick
on mouseUp
put "The purple dinosaur inadvertently stepped on the cat." & cr \
& "The white dog howled." into tText
put "dog dinosaur cat" into tWords
put textContainsAllWords(tText,tWords)
end mouseUp
function textContainsAllWords tText,tWords
replace "." with space in tText
replace "," with space in tText
split tText using space and space
split tWords using space and space
repeat for each key tWord in tText
delete variable tWords[tWord]
end repeat
return the keys of tWords is empty
end textContainsAllWords
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution