module TFClient::StringUtils
Public Class Methods
remove_color_control_chars(string:)
click to toggle source
# File lib/textflight-client/string_utils.rb, line 11 def self.remove_color_control_chars(string:) string.gsub(/\e\[([;\d]+)?m/, "") end
remove_terminal_control_chars(string:)
click to toggle source
The server sends terminal control characters after login These need to be removed
# File lib/textflight-client/string_utils.rb, line 7 def self.remove_terminal_control_chars(string:) string.gsub("\e[2J\e[H", "") end