problem with counting words

Geoff Canyon gcanyon at gmail.com
Mon Oct 13 01:11:11 EDT 2014


Here's a function to count the words disregarding quotes. Note that it's
important to replace quotes with space, because there are three words in

    this is"three words"

and there are three words in

    this isthree words

but you want to count four words, which this will do:

function wordsWithoutQuotes S
   replace quote with space in S
   return the number of words in S
end wordsWithoutQuotes



More information about the use-livecode mailing list