3 added 159 characters in body
source | link

CJam, 23 2222 20 bytes

Thanks to Dennis for saving 2 bytes.

lqN/_@f#_ea_rf#_:e>\fm.{S*\N}

This reads the lines from command-line arguments and the character from STDIN.

The online interpreter doesn't support command-line arguments, but you can Test ittest an equivalent version here.

Explanation

l     e# Read the alignmentea character.
qN/   e# Read the rest ofGet the input and splitlines intofrom linesARGV.
_@f#_rf#  e# Duplicate input, pullread upthe character and find index of character in each line.
_:e>  e# Duplicate indices and find maximum.
\fm   e# Subtract each index from the maximum index.
.{    e# Apply this block to each pair of line and (max_index - index).
  S*  e#   Get a string with the right amount of spaces.
  \N  e#   Swap spaces with line and push a line feed.
}

CJam, 23 22 bytes

lqN/_@f#_:e>\fm.{S*\N}

Test it here.

Explanation

l     e# Read the alignment character.
qN/   e# Read the rest of the input and split into lines.
_@f#  e# Duplicate input, pull up character and find index of character in each line.
_:e>  e# Duplicate indices and find maximum.
\fm   e# Subtract each index from the maximum index.
.{    e# Apply this block to each pair of line and (max_index - index).
  S*  e#   Get a string with the right amount of spaces.
  \N  e#   Swap spaces with line and push a line feed.
}

CJam, 23 22 20 bytes

Thanks to Dennis for saving 2 bytes.

ea_rf#_:e>\fm.{S*\N}

This reads the lines from command-line arguments and the character from STDIN.

The online interpreter doesn't support command-line arguments, but you can test an equivalent version here.

Explanation

ea    e# Get the lines from ARGV.
_rf#  e# Duplicate input, read the character and find index of character in each line.
_:e>  e# Duplicate indices and find maximum.
\fm   e# Subtract each index from the maximum index.
.{    e# Apply this block to each pair of line and (max_index - index).
  S*  e#   Get a string with the right amount of spaces.
  \N  e#   Swap spaces with line and push a line feed.
}
2 deleted 12 characters in body
source | link

CJam, 2323 22 bytes

lqN/_@f#_:e>\f-Sf*\e>\fm.+N*{S*\N}

Test it here.Test it here.

Needs more golf...

Explanation

l     e# Read the alignment character.
qN/   e# Read the rest of the input and split into lines.
_@f#  e# Duplicate input, pull up character and find index of character in each line.
_:e>  e# Duplicate indices and find maximum.
\fm   e# Subtract each index from the maximum index.
.{    e# Apply this block to each pair of line and (max_index - index).
  S*  e#   Get a string with the right amount of spaces.
  \N  e#   Swap spaces with line and push a line feed.
}

CJam, 23 bytes

lqN/_@f#_:e>\f-Sf*\.+N*

Test it here.

Needs more golf...

CJam, 23 22 bytes

lqN/_@f#_:e>\fm.{S*\N}

Test it here.

Explanation

l     e# Read the alignment character.
qN/   e# Read the rest of the input and split into lines.
_@f#  e# Duplicate input, pull up character and find index of character in each line.
_:e>  e# Duplicate indices and find maximum.
\fm   e# Subtract each index from the maximum index.
.{    e# Apply this block to each pair of line and (max_index - index).
  S*  e#   Get a string with the right amount of spaces.
  \N  e#   Swap spaces with line and push a line feed.
}
1
source | link

CJam, 23 bytes

lqN/_@f#_:e>\f-Sf*\.+N*

Test it here.

Needs more golf...