Nothing
plu_ral()
now accepts vectors for arguments n
and pl
.plu_ral(c("word", "phrase"), n = c(1, 2))
returns c("word", "phrases")
.plu_ral()
argument n_fn
is now deprecated.plu_stick()
is now defunct.plu_ralize()
.plu_ralize()
in your package without depending on plu
, using the staticimports
package.plu_ralize()
.plu_ral()
and plu_more()
, which use plu_ralize()
internally.plu_stick()
in favor of knitr::combine_words()
or glue::glue_collapse()
.plu_ral()
now supports arbitrary delimiters for special sequences.plu_ral("attorney [general]", open = "[", close = "]")
produces "attorneys general".plu_ral()
now supports {braced|pipe} sequences of indefinite length.plu_ral("{one|two|three|more}", n = 3)
produces "three".plu_ral("{one|two|three|more}", n = 50)
produces "more".open
and close
.plu_ralize()
.plu_ral()
and plu_more()
, which use plu_ralize()
internally.plu_ral()
now correctly handles {braced} strings that contain sentence breaks.plu_ral()
now correctly handles {braced|pipe} sequences when pl
is set to FALSE
.plu_ral("{singular|plural}", pl = FALSE)
now returns "singular"
instead of incorrectly returning "plural"
.plu_ralize()
now correctly handles ALL-CAPS words where their lowercase equivalent has an irregular plural.plu_ralize("CHILD")
now returns "CHILDs"
instead of incorrectly returning "Children"
.is_capital(strict = TRUE)
now correctly handles non-character inputs.is_capital(1, strict = TRUE)
no returns FALSE
instead of incorrectly returning NA
.crayon
if it is installed.plu::stick()
now produce errors.rlang
and stringi
.backports
.plu::more()
limits a vector to the first n
elements with a message for remaining elements.plu::more(letters, max = 2)
yields c("a", "b", "24 more characters")
.
The convenience function get_fun()
finds a function using a character string or unquoted function name, with or without colons.
plu::ral()
now ensures that the capitalization of a phrase stays the same after pluralizing.
plu::ral("A sentence.")
now results in "Sentences." rather than "sentences."
Convenience functions around capitalization have been added:
is_capital()
tests if a character (or string of characters) is capital or lowercase.is_capitalized()
tests if the first alphabetic character in a string is capital.capitalize()
converts the first alphabetic character in a string to capital.tools::toTitleCase()
or stringr::str_to_sentence()
, this does not change the capitalization of any subsequent characters.plu::stick()
's oxford
now defaults to FALSE
rather than depending on the user's environment.plu::stick()
's syndeton
is now deprecated in favor of explicitly setting sep
and conj
.plu::stick()
's fn
and ...
are now deprecated in favor of applying a function to x
before passing it into plu::stick()
.pkgdown
site.DESCRIPTION
.?plu
).plu::ral()
from inside other functions.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.