Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

has_style

Check if a string has some ANSI styling


Description

Check if a string has some ANSI styling

Usage

has_style(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.

Examples

## The second one has style if crayon is enabled
has_style("foobar")
has_style(red("foobar"))

crayon

Colored Terminal Output

v1.4.1
MIT + file LICENSE
Authors
Gábor Csárdi [aut, cre], Brodie Gaslam [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.