in.middle <- c("world", paste0("hello", red), "wow")

in.end <- c("world", "wow", paste0("hello", red))

in.start <- c(paste0("hello", red), "wow", "world")

has_ctl("hello world", ctl = c("sgr", "sgr"))

Argument `x` contains a malformed CSI or OSC sequence at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

Warning in has_ctl("hello\033[31#0") :
  Argument `x` contains a malformed CSI or OSC sequence at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

has_ctl("hello\nworld", ctl = c("all", "nl"))

has_ctl("hello\nworld", ctl = c("all", "c0"))

has_ctl("hello\tworld", ctl = c("all", "c0"))

has_ctl("hello\033pworld", ctl = c("all", "esc"))

Error in has_ctl("hello world", warn = NULL) : 
  Argument `warn` must be TRUE or FALSE.

Error in has_ctl("hello world", 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 has_ctl("hello world", ctl = "bananas") : 
  Argument `ctl` may contain only values in `c("all", "nl", "c0", "sgr", "csi", "esc", "url", "osc")`

has_ctl("hello world", ctl = NA_character_)

Error in has_ctl("hello world", ctl = NA_character_) : 
  Argument `ctl` may contain only values in `c("all", "nl", "c0", "sgr", "csi", "esc", "url", "osc")`

has_ctl(c("\033[31mhello", "wo\nrld"), ctl = character())

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