stringr 1.3.0
API changes
- During package build, you may see
Error : object ‘ignore.case’ is not exported by 'namespace:stringr'
.
This is because the long deprecatedstr_join()
,ignore.case()
and
perl()
have now been removed.
New features
-
str_glue()
andstr_glue_data()
provide convenient wrappers around
glue
andglue_data()
from the glue package
(#157). -
str_flatten()
is a wrapper aroundstri_flatten()
and clearly
conveys flattening a character vector into a single string (#186). -
str_remove()
andstr_remove_all()
functions. These wrap
str_replace()
andstr_replace_all()
to remove patterns from strings.
(@Shians, #178) -
str_squish()
removes spaces from both the left and right side of strings,
and also converts multiple space (or space-like characters) to a single
space within strings (@stephlocke, #197). -
str_sub()
gainsomit_na
argument for ignoringNA
. Accordingly,
str_replace()
now ignoresNA
s and keeps the original strings.
(@yutannihilation, #164)
Bug fixes and minor improvements
-
str_trunc()
now preserves NAs (@ClaytonJY, #162) -
str_trunc()
now throws an error whenwidth
is shorter thanellipsis
(@ClaytonJY, #163). -
Long deprecated
str_join()
,ignore.case()
andperl()
have now been
removed.