Error in strsplit_ctl(str.2, "", term.cap = 1:3) : 
  Argument `term.cap` must be character.

strsplit_ctl(str.2, "", term.cap = "bananas")

Argument `term.cap` may only contain values in c("all", "bright", "256", "truecolor", "old")

Error in strsplit_ctl(str.2, "", term.cap = "bananas") : 
  Argument `term.cap` may only contain values in c("all", "bright", "256", "truecolor", "old")

Error in strsplit_ctl(str.2, "", ctl = 1:3) : 
  Argument `ctl` must be character.

strsplit_ctl(str.2, "", ctl = "bananas")

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

Error in strsplit_ctl(str.2, "", ctl = "bananas") : 
  Argument `ctl` may contain only values in `c("all", "nl", "c0", "sgr", "csi", "esc", "url", "osc")`

Argument `split` may not be "bytes" encoded.

Error in strsplit_ctl("a b", str.bytes) : 
  Argument `split` may not be "bytes" encoded.

# can't work, ideally would issue a warning, but detecting stripped
# escape sequences in regular expression will be complicated

strsplit_sgr("hello\033[31mworld", "\033[31m", fixed = TRUE)

strsplit_ctl("a\nb", "\n", ctl = c("all", "nl"))