Argument `tabs.as.spaces` must be TRUE or FALSE.

Error in substr2_ctl(hello2.0, 1, 2, tabs.as.spaces = NA) : 
  Argument `tabs.as.spaces` must be TRUE or FALSE.

substr2_ctl(hello2.0, 1, 2, tab.stops = -(1:3))

Argument `tab.stops` must be numeric, strictly positive, and representable as an integer.

Error in substr2_ctl(hello2.0, 1, 2, tab.stops = -(1:3)) : 
  Argument `tab.stops` must be numeric, strictly positive, and representable as an integer.

substr2_ctl(hello2.0, 1, 2, tab.stops = 0)

Error in substr2_ctl(hello2.0, 1, 2, tab.stops = 0) : 
  Argument `tab.stops` must be numeric, strictly positive, and representable as an integer.

substr2_ctl(hello2.0, 1, 2, round = "bananas")

Argument `round` must partial match one of c("start", "stop", "both", "neither")

Error in substr2_ctl(hello2.0, 1, 2, round = "bananas") : 
  Argument `round` must partial match one of c("start", "stop", "both", "neither")

substr2_ctl(hello2.0, 1, 2, term.cap = 0)

Error in substr2_ctl(hello2.0, 1, 2, term.cap = 0) : 
  Argument `term.cap` must be character.

substr2_ctl(hello2.0, 1, 2, term.cap = "bananas")

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

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

substr2_ctl(hello2.0, 1, 2, type = "bananas")

Argument `type` must partial match one of c("chars", "width", "graphemes")

Error in substr2_ctl(hello2.0, 1, 2, type = "bananas") : 
  Argument `type` must partial match one of c("chars", "width", "graphemes")

substr2_ctl(hello2.0, 1, 2, ctl = "bananas")

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

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

Error in substr2_ctl(hello2.0, 1, 2, ctl = 0) : 
  Argument `ctl` must be character.

tryCatch(substr_sgr("\033[31;42!mhello world", 2, 4), warning = function(x) conditionMessage(x))