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

style

Add style to a string


Description

See names(styles), or the crayon manual for available styles.

Usage

style(string, as = NULL, bg = NULL)

Arguments

string

Character vector to style.

as

Style function to apply, either the function object, or its name, or an object to pass to make_style().

bg

Background style, a style function, or a name that is passed to make_style().

Value

Styled character vector.

Examples

## These are equivalent
style("foobar", bold)
style("foobar", "bold")
bold("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.