has_style: Check if a string has some ANSI styling

View source: R/has_ansi.R

has_styleR Documentation

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"))

gaborcsardi/crayon documentation built on Nov. 10, 2023, 9:15 a.m.