ansi_simplify: Simplify ANSI styling tags

View source: R/ansiex.R

ansi_simplifyR Documentation

Simplify ANSI styling tags

Description

It creates an equivalent, but possibly shorter ANSI styled string, by removing duplicate and empty tags.

Usage

ansi_simplify(x, csi = c("keep", "drop"))

Arguments

x

Input string

csi

What to do with non-SGR ANSI sequences, either "keep", or "drop" them.

Value

Simplified cli_ansi_string vector.


r-lib/cli documentation built on April 4, 2024, 11:48 a.m.