File: cli_fmt.Rd

package info (click to toggle)
r-cran-cli 3.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,288 kB
  • sloc: ansic: 16,412; cpp: 37; sh: 13; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (2)
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")
})
}