How strings are twisted
The twisting algorithm is very simple. Each column is shifted down by its index (col 0 moves down 0, col 1 moves 1, ...). The column shift wraps to the top. It works like this:
aaaa
bbbb
cccc
Becomes:
a
ba
cba
----
cba
cb
c
With everything under the line wrapping to the top. Real example:
Original:
\\\\\\\\\\\\
............
............
............
Twisted:
\...\...\...
.\...\...\..
..\...\...\.
...\...\...\
Input
Input is either an array of strings, or a multi-line string. All lines have the same length.
Output
The twisted string, multi-line output to std-out (or closest alternative).
Examples:
(>
denotes input, trailing space is important)
>Hello, world!
>I am another
>string to be
>twisted!
Hwrmoe oo br!
Ieii ,dttr e
s lsna !ohl
ttaltgnw ed
>\\\\\\\\\\\\
>............
>............
>............
\...\...\...
.\...\...\..
..\...\...\.
...\...\...\
>abcdefg
>.......
a.c.e.g
.b.d.f.
>abcdefghij
>..........
>..........
a..d..g..j
.b..e..h..
..c..f..i.
>\\\\.....././
>...../.......
>........././.
>..../.^\\....
\.........../
.\....^..../.
..\../.\../..
...\/...\/...
>cdeab
>deabc
>eabcd
>abcde
cbbbb
ddccc
eeedd
aaaae
>aeimquy37
>bfjnrvz48
>cgkosw159
>dhlptx260
ahknqx147
beloru258
cfipsvy69
dgjmtwz30
>abcdefghi
>jklmnopqr
>stuvwxyz1
>234567890
a3ume7yqi
jb4vnf8zr
skc5wog91
2tld6xph0