5
1
Why don't you grow up?
In the past week a meme involving the young actor Aaron Bailey became trending in most Brazilian social networks. Entitled "why don't you grow up" it consists in repeating a sentence replacing its vowels with i
s (it's a bit more complicated than that, I'll explain below). As I want to be a cool guy I decided to write a program that mimimifies
a given string.
Challenge
The challenge consists of mimimifying
a string, following the rules:
ão
andõe
should be replaced withim
.ca
,ka
,que
,ke
,qui
,ki
,co
,ko
,cu
, andku
should be replaced withki
.ça
,ce
,çe
,ci
,çi
,ço
, andçu
should be replaced withci
.ga
,gue
,gui
,go
, andgu
should be replaced withgui
.ja
,ge
,je
,gi
,ji
,jo
, andju
should be replaced withji
- You can assume that
qua
,quo
,quu
,gua
,guo
, andguu
, will never appear, onlya
ando
can have tildes and if they do they'll be followed byo
ande
, repsectively (ão
,õe
). - The only time
u
s are allowed in output strings isgui
, besides that case all other vowels present should bei
s. - In all other circumstances all vowels must be replaced with
i
s. - Other than tilde all other accents may be ignored.
- Two or more
i
s in a row are not allowed, you should replace them with only one (Piauiense
->Pinsi
)
Examples
Input
Por que você só fala assim?
Output
pir ki vici si fili issim?
Input
Que horas são?
Output
ki hiris sim?
Input
Óculos sem lente pode ser armação
Output
ikilis sim linti pidi sir irmicim
Input
Ganha o código com menos bytes
Output
guinhi i kidigui kim minis bytis
Rules
- The vowels are
a
,e
,i
,o
, andu
. - You can see the full list of possible accents here.
- code-golf: the shortest code in bytes wins. Check meta if counting bytes is awkward in your language.
- Standard loopholes are forbidden
- Your output must be consistent in case: all upper/all lower.
- You may assume the input to be in whichever encoding you want but if you do you must specify it.
Happy golfing!/Hippy guilfing!
3
(This phenomenon sounds similar to Ermahgerd in English.)
– Greg Martin – 2016-11-12T19:50:41.150What is the list of accented characters? – user41805 – 2016-11-13T11:24:22.773
@Mego why? By ignored I meant there presence is irrelevant (
ê
==e
,ó
==o
) – fpg1503 – 2016-11-13T12:03:21.197