module Terminal::Table::Util
Public Class Methods
Source
# File lib/terminal-table/util.rb, line 5 def ansi_escape(line) line.to_s.gsub(/\x1b(\[|\(|\))[;?0-9]*[0-9A-Za-z]/, ''). gsub(/\x1b(\[|\(|\))[;?0-9]*[0-9A-Za-z]/, ''). gsub(/(\x03|\x1a)/, '') end
removes all ANSI escape sequences (e.g. color)
Private Instance Methods
Source
# File lib/terminal-table/util.rb, line 5 def ansi_escape(line) line.to_s.gsub(/\x1b(\[|\(|\))[;?0-9]*[0-9A-Za-z]/, ''). gsub(/\x1b(\[|\(|\))[;?0-9]*[0-9A-Za-z]/, ''). gsub(/(\x03|\x1a)/, '') end
removes all ANSI escape sequences (e.g. color)