class PrettierPrint::Buffer::StringBuffer

gsub!.
trim! method that trims off trailing whitespace from the string using
This is an output buffer that wraps a string output object. It provides a

def <<(object)

def <<(object)
  @output << object
end

def initialize(output = "".dup)

def initialize(output = "".dup)
  @output = output
end

def trim!

def trim!
  length = output.length
  output.gsub!(/[\t ]*\z/, "")
  length - output.length
end