Skip to content

Commit

Permalink
Merge pull request #691 from ramongss/add-examples-no
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi authored May 4, 2024
2 parents 1aa470c + 560eaff commit 71fd2a5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/pluralize.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ make_quantity <- function(object) {
#' an expression that sets the pluralization quantity without printing
#' anything. See examples below.
#'
#' @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.
#'
#' @export
#' @family pluralization

Expand Down

0 comments on commit 71fd2a5

Please sign in to comment.