Skip to main content
1 of 2
mazzy
  • 7.2k
  • 2
  • 12
  • 22

Powershell, 70 bytes

$args|% t*y|%{if($_-le$p){$x;rv x}
$x="$x".PadRight($_-65)+($p=$_)}
$x

Explanation:

For each character in argument strings:

  • Output string $x and clear $x value (rv is alias for Remove-Variable), if a code of the current character less or equivalent (-le) to a code of the previous character.
  • Append spaces and the current character to $x, store it to $x. Also it freshes a previous character value.

Output last $x.

mazzy
  • 7.2k
  • 2
  • 12
  • 22