diff --git a/NAMESPACE b/NAMESPACE index cc05d6b..4d860c2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,3 +8,4 @@ export(really_pretty) importFrom(english,as.english) importFrom(stringr,str_detect) importFrom(stringr,str_to_title) +importFrom(stringr,str_trim) diff --git a/R/give_candygrams.R b/R/give_candygrams.R index 8d71397..1bccfab 100644 --- a/R/give_candygrams.R +++ b/R/give_candygrams.R @@ -6,7 +6,7 @@ #' #' @return A candy gram announcement #' -#' @importFrom stringr str_detect str_to_title +#' @importFrom stringr str_detect str_to_title str_trim #' @importFrom english as.english #' #' @export @@ -30,7 +30,7 @@ give_candygrams <- function(person, number, number <- str_to_title(as.english(number)) - glue::glue("{number} for {person}.") + glue::glue("{number} for {person}. {extra_message}") |> str_trim(side = "right") diff --git a/README.md b/README.md index 876c029..d8ebbce 100644 --- a/README.md +++ b/README.md @@ -105,5 +105,5 @@ give_candygrams("Glen Coco", 4) ``` r give_candygrams("Gretchen Weiners", 4) -#> [1] "None for Grethen Weiners." +#> None for Gretchen Weiners. ```