class String
  def margin
    arr = self.split("\n")                    # Split into lines
    arr.map! {|x| x.sub!(/\s*\|/,"")}         # Remove leading characters
    str = arr.join("\n")                      # Rejoin into a single line
    self.replace(str)                         # Replace contents of string
  end
end
    
str = <<end.margin
  |This here-document has a "left margin"
  |at the vertical bar on each line.
  |
  | We can do inset quotations,
  | hanging indentions, and so on.
end

