Definition of long text
Long text usually shows emphasis, for instance, loooooool
or yaaaaaaaaaay
. Usually the vowel is replicated many times. In this challenge we require:
At least 3 times, which means
yaaay
andyaaaay
are allowed, butyay
andyaay
are not.Consistent, which means that shoes can turn out be
shoooeees
orshooooeeees
but notshoooeeees
orshooooeees
. Of course, it seems that no one would do that, however, this is to reinforce the next law.Undoubling, which means
beeping
turns out to bebeeepiiing
orbeeeepiiiing
but notbeeeeeepiiing
orbeeeeeeeepiiiing
. This is not the case for long text, but such makes this challenge non-trivial.Thus, the long text might turn out shorter than the original text, that is,
aaaaa
can turn out to beaaa
.
Your challenge
Input
Your input will be a sentence, that is, you may not assume there are only words. We do not guarantee all will be English words, so look out for theeeeeeeeese
.
Output
The long text for the input.
Test cases
We assume you repeat 3 times.
The fox yawns...
=> Theee fooox yaaawns...
Everything is good!!!!!
=> Eeeveeerythiiing iiis goood!!!!!
and NOT EEEveeerythiiing iiis gooooood!!!!!
Eeny, meeny, miny, moe
=> Eeeeeeny, meeeny, miiiny, moooeee
AAARGH
=> AaaRGH
Weeeeeeeeheeeeeee
=> Weeeheee
Note the treatment of capital letters: The first letter remains capital, and the others are lowered. eE
will be eeeEee
, they won't be the same. "Undoubling" only happens for letters which are of the same case (like ee
or AA
, but not for Ee
)
Only the letters from a
, e
, i
, o
, and u
are vowels, case insensitive.
yay
as input result inyyyaaayyy
? \$\endgroup\$theeeeeseeeee
? \$\endgroup\$