Flowdock
indent_text(string, level=1, style="\t", indentfirstline=true) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rexml/text.rb, line 278
    def indent_text(string, level=1, style="\t", indentfirstline=true)
      return string if level < 0
      new_string = ''
      string.each_line { |line|
        indent_string = style * level
        new_line = (indent_string + line).sub(/[\s]+$/,'')
        new_string << new_line
      }
      new_string.strip! unless indentfirstline
      return new_string
    end
Register or log in to add new notes.