Sorting out the sheep from the goats

Tore Nilsen tore.nilsen at me.com
Mon Aug 7 13:51:02 EDT 2017


I do not think that vowels are automatically detected, so you need to put the chars representing vowel sounds into a variabel tVowels . Run a repeat for each char tChar of the string and check if tChar is in tVowels, like this (using Norwegian vowels as an example)

put “aeioyæøå” into tVowels

repeat for each char tChar in tString
   if tChar is in tVowels then
      add 1 to tNumberOfVowels
  end if
  answer tNumberOfVowels
end repeat

Regards
Tore


> 7. aug. 2017 kl. 19:42 skrev Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
> 
> Yes, here's "Mr Sanskrit" asking what is probably a very goofy question indeed:
> 
> I have a series of long strings of characters such as:
> 
> LarrygubAndCheesemakemyfeetstink
> 
> and I would like a happy little routine that could trot along each string and, for each character (and this is ONLY confined
> to the Latin alphabet, at the moment) tell me (or, more importantly, other scripts) whether it is a VOWEL or a CONSONANT.
> 
> Of course, having learnt from Mark Waddingham about the effective nature of G & T s, I may end up answering my own e-mail . . .
> 
> Thanks Mark, I knew you had more to tell me than "just" computer programming :-)
> 
> Richmond.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list