1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cli.R
\name{cli_fmt}
\alias{cli_fmt}
\title{Capture the output of cli functions instead of printing it}
\usage{
cli_fmt(expr, collapse = FALSE, strip_newline = FALSE)
}
\arguments{
\item{expr}{Expression to evaluate, containing \verb{cli_*()} calls,
typically.}
\item{collapse}{Whether to collapse the output into a single character
scalar, or return a character vector with one element for each line.}
\item{strip_newline}{Whether to strip the trailing newline.}
}
\description{
Capture the output of cli functions instead of printing it
}
\examples{
cli_fmt({
cli_alert_info("Loading data file")
cli_alert_success("Loaded data file")
})
}
|