module Travis::Tools::SafeString
def clean(string)
def clean(string) colorized(string).gsub(/\e[^m]+m/, '') end
def colorized(string)
def colorized(string) encoded(string).gsub(/[^[:print:]\e\n]/, '') end
def encoded(string)
def encoded(string) return string unless string.respond_to? :encode string.encode 'utf-8' rescue Encoding::UndefinedConversionError string.force_encoding 'utf-8' end