I done did made a spaceship maw!
Japt, 8 6 bytes
Takes input as an array of characters, outputs an array of strings.
£qYçÃê
Try it
Explanation
£ :Map each element at (0-based) index Y
q : Join input with
Yç : Space repeated Y times
à :End Map
ê :Palindromise
Original, 8 bytes
I/O is a string. Uses the -R
flag. Includes trailing spaces on each line.
¬£múYÄÃê
Try it
Explanation
:Implicit input of string U
¬ :Split
£ :Map each character at 0-based index Y
m : Map original U
ú : Right pad with spaces to length ...
YÄ : Y+1
à :End map
ê :Palindromise
:Implicitly join with newlines
R, 105 99 85 84 79 bytes
-6 thanks to @Kevin Cruissen and @Giuseppe
-14 from changing to a regex based method
-1 thanks to @Giuseppe
-5 thanks to @digEmALl
function(w,n=nchar(w)-1)write(trimws(Map(gsub,"",strrep(" ",n-abs(n:-n)),w)),1)
Try it online!
05AB1E, 10 9 bytes
Saved 1 bytes thanks to Adnan
εINð×ý}û»
Try it online!
Explanation
ε # apply to each in input
I # push the input
Nð× # push <index> spaces
ý # merge the input on the spaces
} # end loop
û # palendromize
» # join on newlines