unhandled_ctl {fansi}R Documentation

Identify Unhandled ANSI Control Sequences

Description

Will return position and types of unhandled Control Sequences in a character vector. Unhandled sequences may cause fansi to interpret strings in a way different to your display. See fansi for details.

Usage

unhandled_ctl(x)

Arguments

x

character vector

Details

This is a debugging function that is not optimized for speed.

The return value is a data frame with five columns:

Value

data frame with as many rows as there are unhandled escape sequences and columns containing useful information for debugging the problem. See details.

Note

Non-ASCII strings are converted to UTF-8 encoding.

See Also

fansi for details on how Control Sequences are interpreted, particularly if you are getting unexpected results.

Examples

string <- c(
  "\033[41mhello world\033[m", "foo\033[22>m", "\033[999mbar",
  "baz \033[31#3m", "a\033[31k", "hello\033m world"
)
unhandled_ctl(string)

[Package fansi version 0.3.0 Index]