Remove ANSI pre-/suffix-fix in a character string.
remove_ANSI(strings)
strings | strings, a character vector |
---|
strings with out ANSI characters
remove_ANSI("\033[34m\033[1ma\033[22m\033[39m") #> [1] "a" remove_ANSI(c("\033[34m\033[1ma\033[22m\033[39m", "\033[34m\033[1mb\033[22m\033[39m")) #> [1] "a" "b"