Given a character and a multiline string, your job is to pad each line of the string so they line up among the given delimiter.
, Programming, Puzzles And, Code golf
Programming, Puzzles And, Code golf
The input will be a multiline string and a character (which you will align among), you may take these in any order / format you wish. The character will appear exactly once per line. Each line of the input may be different in length.
Input can be through function arguments or STDIN.
The output should be the same string centered. You are allowed one trailing newline and no trailing whitespace.
The output should be padded with the minimum amount of spaces. You may not remove any leading whitespace in the input (if it exists).
Output can be from function return or STDOUT.