module HighLine::Wrapper
def self.actual_length(string_with_escapes)
-
(Integer)
- length based on the visual size of the String
Parameters:
-
string_with_escapes
(String
) -- any ANSI colored String
def self.actual_length(string_with_escapes) string_with_escapes.to_s.gsub(/\e\[\d{1,2}m/, "").length end