has_sgr: Check for Presence of Control Sequences

View source: R/sgr.R

has_sgrR Documentation

Check for Presence of Control Sequences

Description

This function is deprecated in favor of the has_ctl. It checks for CSI SGR and OSC hyperlink sequences.

Usage

has_sgr(x, warn = getOption("fansi.warn", TRUE))

Arguments

x

a character vector or object that can be coerced to such.

warn

TRUE (default) or FALSE, whether to warn when potentially problematic Control Sequences are encountered. These could cause the assumptions fansi makes about how strings are rendered on your display to be incorrect, for example by moving the cursor (see ?fansi). At most one warning will be issued per element in each input vector. Will also warn about some badly encoded UTF-8 strings, but a lack of UTF-8 warnings is not a guarantee of correct encoding (use validUTF8 for that).

Value

logical of same length as x; NA values in x result in NA values in return


fansi documentation built on May 29, 2024, 4:03 a.m.