Perl 6, 43 bytes
{(0....comb-1...0)>>.&{join ' 'x$^a,.comb}}
Returns a list of lines.
Explanation:
{ } # Anonymous code block
(0....comb-1...0) # A list from
0 # 0
... # to
.comb-1 # the length of the input string -1
... # back to
0 # 0
>>.&{ } # Map each number to
join ,.comb # Join the list of characters
' 'x$^a # With the number of spaces
Perl 6, 43 bytes
{(0....comb-1...0)>>.&{join ' 'x$^a,.comb}}
Returns a list of lines.
Explanation:
{ } # Anonymous code block
(0....comb-1...0) # A list from
0 # 0
... # to
.comb-1 # the length of the input string -1
... # back to
0 # 0
>>.&{ } # Map each number to
join ,.comb # Join the list of characters
' 'x$^a # With the number of spaces