fansi:::process("hello\033[44m\a world", ctl = c("all", "c0"))

fansi:::process("hello.  \033[44m\a world", ctl = c("all"))

fansi:::process("hello.  \033[44m\a world", ctl = c("all", "c0"))

fansi:::process("hello. \033[44m \a world", ctl = c("all"))

fansi:::process("hello. \033[44m \a world", ctl = c("all", "c0"))

fansi:::process("hello.\n\033[44m \a world", ctl = c("all"))

fansi:::process("hello.\n\033[44m \a world", ctl = c("all", "c0"))

fansi:::process("hello.\n\033[44m\n\a world", ctl = c("all"))

fansi:::process("hello.\n\033[44m\n\a world", ctl = c("all", 
    "c0"))

fansi:::process("hello.\n\033[44m\a\n world", ctl = c("all"))

fansi:::process("hello.\n\033[44m\a\n world", ctl = c("all", 
    "c0"))

string.0 <- "hello\033k\033[45p world\n\033[31mgoodbye\a moon"

strip_ctl(string.0, c("nl", "c0", "sgr", "csi", "esc"))

string.1 <- "hello\033\033[45p world\n\033[31#3mgoodbye\a moon"

Warning in strip_ctl(string.1, c("nl", "sgr", "esc")) :
  Argument `x` contains a malformed escape sequence at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

Warning in strip_ctl(string.1, "all") :
  Argument `x` contains a malformed escape sequence at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

Warning in strip_ctl(string.1, c("all", "sgr")) :
  Argument `x` contains a malformed escape sequence at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

strip_ctl(c(string.0, string.1, "hello"), warn = FALSE)

[1] "hello worldgoodbye moon"     "hello[45p worldgoodbye moon"
[3] "hello"

Error in strip_ctl("hello\033[41mworld", warn = 1:3) : 
  Argument `warn` must be TRUE or FALSE.

Error in strip_ctl("hello\033[41mworld", ctl = 1:3) : 
  Argument `ctl` must be character.

Argument `ctl` may contain only values in `c("all", "nl", "c0", "sgr", "csi", "esc", "url", "osc")`

Error in strip_ctl("hello\033[41mworld", ctl = "bananas") : 
  Argument `ctl` may contain only values in `c("all", "nl", "c0", "sgr", "csi", "esc", "url", "osc")`

Parameter `strip` has been deprecated; use `ctl` instead.

Error in strip_sgr("hello\033[41mworld", warn = 1:3) : 
  Argument `warn` must be TRUE or FALSE.