Skip to main content
6 of 6
edited body
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

Retina, 54 53 bytes

T`au`ie`y.
wa
we
T`\oeuia`ao
T`ko`stn\hmyr\w`.a
^a
ka

Try it online.

Explanation

Wooo, showing off even more features from today's 0.7.2 release. :) (The release predates this challenge by about 7 hours.)

T`au`ie`y.

This is a transliteration which replaces a with i and u with e, but only in matches of y.. The purpose of that is to treat ya and yu like yi and ye, respectively, in order to skip the gaps.

wa
we

Replace wa with we to skip that gap as well.

T`\oeuia`ao

Here is the new feature. When rotating sets of characters, the "from" and "to" set in a transliteration are usually almost identical. So now we've got o (without a backslash) to refer to the other set, which allows us to get rid of some duplication. The \o just stands for a literal o in that case. So the two sets expand to:

oeuia
aoeuia

The extraneous a in the second set is ignored and the vowels are replaced cyclically as expected.

T`ko`stn\hmyr\w`.a

This does the same thing for the consonants, but using o in the first set (just because we can...). h and w need escaping because they are character classes. The expanded sets are:

kstnhmyrw
stnhmyrw

The .a restricts this operation to syllables that end in a, i.e. those that wrap to the next line of the table.

^a
ka

Finally, we replace a single a with ka, because that case cannot be handled by the previous transliteration.

Martin Ender
  • 197.2k
  • 67
  • 447
  • 975