ansi_has_any: Check if a string has some ANSI styling

Description Usage Arguments Value See Also Examples

View source: R/ansiex.R

Description

Check if a string has some ANSI styling

Usage

1
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

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

RonMobile/cli documentation built on Dec. 18, 2021, 11 a.m.