File: pluralization-helpers.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 (40 lines) | stat: -rw-r--r-- 841 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pluralize.R
\name{no}
\alias{no}
\alias{qty}
\title{Pluralization helper functions}
\usage{
no(expr)

qty(expr)
}
\arguments{
\item{expr}{For \code{no()} it is an expression that is printed as "no" in
cli expressions, it is interpreted as a zero quantity. For \code{qty()}
an expression that sets the pluralization quantity without printing
anything. See examples below.}
}
\description{
Pluralization helper functions
}
\examples{
nfile <- 0; cli_text("Found {no(nfile)} file{?s}.")

#> Found no files.

nfile <- 1; cli_text("Found {no(nfile)} file{?s}.")

#> Found 1 file.

nfile <- 2; cli_text("Found {no(nfile)} file{?s}.")

#> Found 2 files.

}
\seealso{
Other pluralization: 
\code{\link{pluralization}},
\code{\link{pluralize}()}
}
\concept{pluralization}