powered by
The input may be of class cli_ansi_string class, this is also dropped from the result.
cli_ansi_string
ansi_strip(string, sgr = TRUE, csi = TRUE, link = TRUE)
The cleaned up string. Note that ansi_strip() always drops the cli_ansi_string class, even if sgr and sciareFALSE`.
ansi_strip()
sgr
are
The input string.
Whether to remove for SGR (styling) control sequences.
Whether to remove for non-SGR control sequences.
Whether to remove ANSI hyperlinks.
Other low level ANSI functions: ansi_has_any(), ansi_hide_cursor(), ansi_regex(), ansi_string()
ansi_has_any()
ansi_hide_cursor()
ansi_regex()
ansi_string()
ansi_strip(col_red("foobar")) == "foobar"
Run the code above in your browser using DataLab