Find words with alternating vowels and consonants: Difference between revisions

Content added Content deleted
m (→‎{{header|AppleScript}}: Idiomatic: Relabelled. Added preamble.)
Line 87: Line 87:


=={{header|AppleScript}}==
=={{header|AppleScript}}==
===Procedural===
===Idiomatic===
The handler here is case- and diacritical-insensitive and has an option to treat "y" as a vowel. With the text file located on the computer's startup disk, it performs the set task in just under a third of a second on my machine, which is probably good enough for such a silly task. However, the "Functional" script beneath it, although going to great lengths (!) to disguise how it works and how to use it (the text file has to be in the same folder as the compiled script file), and performing a strictly lower-case search (easily fixed by starting the regex with "(?i)"), is just over ten times as fast — including additional time spent formatting the output for display!

<lang applescript>(*
<lang applescript>(*
With AppleScript's text item delimiters set to all the vowels, the 'text items' of a word with alternating
With AppleScript's text item delimiters set to all the vowels, the 'text items' of a word with alternating