List Words from Textarea

Richard Gaskin ambassador at fourthworld.com
Wed Oct 13 19:06:29 EDT 2010


Here's one from the LiveCode Resource Center included in the product (in 
the RC see Tutorials -> Text ->Listing all the unique words in a piece 
of text):


function uniqueWordsOf theString
   repeat for each word thisWord in theString
     add 1 to wordsList[thisWord] -- array variable
   end repeat
   return the keys of wordsList -- the list of words
end uniqueWordsOf


--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv



More information about the Use-livecode mailing list