nchar_ctl("hello\033[31m world", type = 1)

Error in nchar_ctl("hello\033[31m world", type = 1) : 
  Argument `type` must partial match one of c("chars", "width", "graphemes", "bytes")

nchar_ctl("hello\033[31m world", type = "bananas")

Error in nchar_ctl("hello\033[31m world", type = "bananas") : 
  Argument `type` must partial match one of c("chars", "width", "graphemes", "bytes")

Error in nzchar_ctl(9:10, warn = 1:3) : 
  Argument `warn` must be TRUE or FALSE.

nzchar_ctl("hello\033[31m world", keepNA = 1:3)

Error in nzchar_ctl("hello\033[31m world", keepNA = 1:3) : 
  Argument `keepNA` must be interpretable as a scalar logical.

nzchar_ctl("hello\033[31m world", ctl = 1)

Error in nzchar_ctl("hello\033[31m world", ctl = 1) : 
  Argument `ctl` must be character.

nzchar_ctl("hello\033[31m world", ctl = "bananas")

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