Skip to main content
added 11 characters in body
Source Link
kalsowerus
  • 2k
  • 11
  • 17

05AB1E, 101 104104 88 bytes

-16 bytes thanks to Okx

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`Šs¤sŠksŠèsŠì2׫

Try it online!Try it online!

Explanation

                  Argument: s
žOÃćIskžOÃ0èk            Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`.•7¶ëÒ—Öb´ƒ≠Ä“šʒƵJ^ÝV“Îpи•S2ôDí«ø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning

05AB1E, 101 104 bytes

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`Šs¤sŠksŠèsŠì2׫

Try it online!

Explanation

                  Argument: s
žOÃćIsk           Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning

05AB1E, 101 104 88 bytes

-16 bytes thanks to Okx

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`Šs¤sŠksŠèsŠì2׫

Try it online!

Explanation

                  Argument: s
žOÃ0èk            Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
.•7¶ëÒ—Öb´ƒ≠Ä“šʒƵJ^ÝV“Îpи•S2ôDí«ø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning
added 25 characters in body
Source Link
kalsowerus
  • 2k
  • 11
  • 17

05AB1E, 101101 104 bytes

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôø`Šs¤sŠksŠèsŠì2׫žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`Šs¤sŠksŠèsŠì2׫

Try it online!Try it online!

Explanation

                  Argument: s
žOÃćIsk           Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôø`"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning

05AB1E, 101 bytes

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôø`Šs¤sŠksŠèsŠì2׫

Try it online!

Explanation

                  Argument: s
žOÃćIsk           Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning

05AB1E, 101 104 bytes

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`Šs¤sŠksŠèsŠì2׫

Try it online!

Explanation

                  Argument: s
žOÃćIsk           Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôDí«ø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning
Source Link
kalsowerus
  • 2k
  • 11
  • 17

05AB1E, 101 bytes

I somehow hope this can be done way more efficiently.

žOÃćIsk>[DIs£¤žPså#\>]s[DIsèDžOså#\>]ŠŠ"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôø`Šs¤sŠksŠèsŠì2׫

Try it online!

Explanation

                  Argument: s
žOÃćIsk           Get index of first vowel in s
>[DIs£¤žPså#\>]   Increment index and split s until last character of substring is a consonant
s[DIsèDžOså#\>]   Increment index an get character at index in s until character is a vowel
ŠŠ                Rearrange stack
"bpcgdtfvgkhhjjkgllmmnnpbqqrrsztdvfwwxxzs"S2ôø`   Prepare character substitution map
Šs                Rearrange stack
¤                 Last character of substring
sŠ                Rearrange stack (yes, again)
k                 Index of last character in substitution key list
sŠ                Rearrange stack (it won't stop)
è                 Character at index in character substitution value list
sŠ                Rearrange stack (ONE LAST TIME)
ì2׫              Prepend substitution consonant before vowel, duplcicate and concatenate with the substring from the very beginning