At 8:46 PM +0200 7/14/2006, jbv wrote:
Does anyone have some very fast code to find the longest word
(number of chars) in a text ?
This one was the fastest of those I tested:
function longestWord myText
repeat for each word thisWord in myText
put thisWord into myArray[the length of thisWord]
end repeat
get the keys of myArray
replace return with comma in it
return myArray[max(it)]
end longestWord
--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com
_______________________________________________
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