Write the shortest possible program or function that will join a list of columnar strings.
For this challenge, columnar strings are defined as one-character-wide strings spanning across multiple lines. Each character, except for the last one, is separated by a newline character. Some examples, separated by ---
:
a
b
c
d
---
h
e
l
l
o
---
c
o
d
e
g
o
l
f
---
"
q
u
o
t
e
s
"
Given a list of columnar strings, join them into a single string with multiple columns. If the columnar string is longer than its surroundings, it should be left-padded by spaces.
Notes
- This is code-golf, so shortest code wins!
- You may assume inputs are ASCII only.
- You may have trailing newlines.
- You may have trailing spaces.
- This is not a transpose challenge; each string in the input list of strings has newlines separating each character. The "multi-line strings vs list of strings as input" default does not apply here; each string in the test cases are separated by
---
and include newlines.
Test Cases
Input:
---
a
b
c
d
---
h
e
l
l
o
---
c
o
d
e
g
o
l
f
---
"
q
u
o
t
e
s
"
---
Output: (note how `hello` and `code golf` are left-padded by spaces)
ahc"
beoq
cldu
dleo
o t
ge
os
l"
f
Input:
---
h
w
---
e
o
---
l
r
---
l
l
---
o
d
---
Output:
hello
world
Input:
---
p
f
---
b
m
v
---
t
s
---
d
n
z
---
k
x
---
g
N
h
---
Output:
pbtdkg
m n N
fvszxh
Input:
---
1
---
2
---
3
---
4
---
6
5
---
Output:
1 6
2
3
4
5
Input:
---
a
c
---
|
---
b
d
---
Output:
a|b
d
c
Input:
---
Output:
(empty output, or single newline)