[90m[39m  if(!is.character(x)) x <- as.character(x)[90m[39m
[34m>[39m [90m[39m    [34mstop[39m[34m([39m[34m"non-numeric substring arguments not supported"[39m[34m)[39m[90m[39m
[90m[39m  ansi <- re_table(ansi_regex, x)[90m[39m
[90m[39m  text <- non_matching(ansi, x, empty=TRUE)[90m[39m
[90m[39m  splits <- re_table(split, plain, ...)[90m[39m
[90m[39m  chunks <- non_matching(splits, plain, empty = TRUE)[90m[39m
[33m<[39m [90m[39m  # silently recycle `split`; [33mnote[39m [33mcurrently[39m [33m`re_table`[39m doesn't [33muse[39m [33mthis[39m [33mbut[39m[90m[39m
[34m>[39m [90m[39m  # silently recycle `split`; doesn't [34mmatter[39m [34mcurrently[39m [34msince[39m [34mwe[39m [34mdon[39m[34m't[39m [34msupport[39m[90m[39m
[90m[39m  # Drop empty chunks to align with `substr` behavior[90m[39m