ansi_has_any {cli}R Documentation

Check if a string has some ANSI styling

Description

Check if a string has some ANSI styling

Usage

ansi_has_any(string)

Arguments

string

The string to check. It can also be a character vector.

Value

Logical vector, TRUE for the strings that have some ANSI styling.

See Also

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

Examples

## The second one has style if ANSI colors are supported
ansi_has_any("foobar")
ansi_has_any(col_red("foobar"))

[Package cli version 3.0.1 Index]