Skip to content

This function sets the class of its argument, activating ANSI-string-specific methods such as for printing.

Usage

ansi_string(x)

Arguments

x

A character vector or something that can be coerced into one.

Value

A cli_ansi_string object, a subclass of character, with the same length and contents as x.

See also

Other low level ANSI functions: ansi_has_any(), ansi_hide_cursor(), ansi_regex(), ansi_strip()