Simple, Consistent Wrappers for Common String Operations
Overview
A consistent, simple and easy to use set of wrappers around the fantastic 'stringi' package. All function and argument names (and positions) are consistent, all functions deal with "NA"'s and zero length vectors in the same way, and the output from one function is easy to feed into the input of another.
Breaking changes
- All relevant stringr functions now preserve names (@jonovik, #575).
str_like(ignore_case)is deprecated, withstr_like()now always case sensitive to better follow the conventions of the SQL LIKE operator (@edward-burn, #543).- In
str_replace_all(), areplacementfunction now receives all values in a single vector. This radically improves performance at the cost of breaking some existing uses (#462).
New features
- New
vignette("locale-sensitive")about locale sensitive functions (@kylieainslie, #404) - New
str_ilike()that follows the conventions of the SQL ILIKE operator (@edward-burn, #543). - New
str_to_camel(),str_to_snake(), andstr_to_kebab()for changing "programming" case (@librill, #573 + @arnaudgallou, #593).
Minor bug fies and improvements
str_*now errors ifpatternincludes anyNAs (@nash-delcamp-slp, #546).str_dup()gains asepargument so you can add a separator between every repeated value (@edward-burn, #564).str_sub<-now gives a more informative error ifvalueis not the correct length.
Show all changes in 1.6.0Hide the rest of the changes in 1.6.0
str_view()displays a message when called with a zero-length character vector (@LouisMPenrod, #497).- New
[[.stringr_patternmethod to match existing[.stringr_pattern(@edward-burn, #569).
From NEWS.md in the release
Install
Health
ERRORre-building of vignette outputsr-release-macos-arm64
Error(s) in re-building vignettes: --- re-building ‘from-base.Rmd’ using rmarkdown Error: processing vignette 'from-base.Rmd' failed with diagnostics: there is no package called ‘sass’ --- failed re-building ‘from-base.Rmd’ --- re-building ‘locale-sensitive.Rmd’ using rmarkdown Error: processing vignette 'locale-sensitive.Rmd' failed with diagnostics: there is no package called ‘sass’ --- failed re-building ‘locale-sensitive.Rmd’ --- re-building ‘regular-expressions.Rmd’ using rmarkdown Error: processing vignette 'regular-expressions.Rmd' failed with diagnostics: there is no package called ‘sass’ --- failed re-building ‘regular-expressions.Rmd’ --- re-building ‘stringr.Rmd’ using rmarkdown Error: processing vignette 'stringr.Rmd' failed with diagnostics: there is no package called ‘sass’ --- failed re-building ‘stringr.Rmd’ SUMMARY: processing the following files failed: ‘from-base.Rmd’ ‘locale-sensitive.Rmd’ ‘regular-expressions.Rmd’ ‘stringr.Rmd’ Error: Vignette re-building failed. Execution halted
- ERROR12 OK, 1 ERRORNow
- ERROR11 OK, 1 ERROR2026-04-27
- OK14 OK2026-03-10
Documentation
- Help pages
- 38 (3 internal)includes a package overview page
- Examples that run
- 100%36 run in a plain check
- Exported functions with examples
- 97%
- Documented parameters
- 93%
- Return-value docs
- 89%
- Help pages citing references
- 0%
- Introduction to stringr HTML
- From base R HTML
- Locale sensitive functions HTML
- Regular expressions HTML
Downloads
Repository
- PRs merged (all time)
- 70%
- Median days to close, 50 most recently updated closed issues
- 87
- Median days to close, 50 most recently updated closed PRs
- 5
Stars over time
Forks over time
Issues over time
PRs over time
15 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/tidyverse/stringr on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2025-11-04 · The repository has a site deploy workflow
pkgdown site last built 2025-11-04
Show all practicesHide 3 practices
Dependencies
Installing stringr adds 7 packages (6 with compiled code, 14 MB of source tarballs). Heaviest: stringi 11 MB, vctrs 1.0 MB, rlang 766 KB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 2,216 more dependents and 298 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.6.0Latest2025-11-04 · current release · diff ↗ ·
added 4 exports
str_ilike, str_to_camel, str_to_kebab, str_to_snake - 1.5.22025-09-08 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.5.12023-11-15 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.5.02022-12-02 · diff ↗ ·
added 10 exports
str_equal, str_escape, str_flatten_comma, str_like, str_rank, str_split_1, str_split_i, str_sub_all, str_unique, str_width - 1.4.12022-08-21 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- 1.4.0
- 1.3.12018-05-10 · diff ↗
- RR 3.5.0 released · 2018-04-23
Show 23 earlier eventsHide 23 earlier events
- 1.3.02018-02-19 · diff ↗ ·
removed 3 exports
ignore.case, perl, str_joinadded 6 exports
str_flatten, str_glue, str_glue_data, str_remove, str_remove_all, str_squish - RR 3.4.0 released · 2017-04-21
- 1.2.0
- 1.1.0
- RR 3.3.0 released · 2016-05-03
- 1.0.02015-04-30 · diff ↗ ·
added 12 exports
%>%, boundary, coll, regex, str_conv, str_order, str_replace_na, str_sort, str_subset, str_to_lower, str_to_title, str_to_upper - RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- RR 3.0.0 released · 2013-04-03
- 0.6.22012-12-06 · diff ↗
- 0.6.1
- RR 2.15.0 released · 2012-03-30
- 0.6
- RR 2.14.0 released · 2011-10-31
- 0.5
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- 0.42010-08-24 · diff ↗ ·
added 21 exports
str_c, str_detect, str_dup, str_extract, str_extract_all, str_length, str_locate, str_locate_all, invert_match, str_match, str_match_all, fixed, ignore.case, str_pad, str_trim, str_replace, str_replace_all, str_split_fixed, str_split, str_sub, str_sub<- - RR 2.11.0 released · 2010-04-22
- 0.32010-02-15 · diff ↗
- 0.22009-11-16 · diff ↗
- 0.1.102009-11-09
- RR 2.10.0 released · 2009-10-26
Package metadata
- First published
- 2009-11-09
- Total releases
- 19 / 17 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-2 | file LICENSE in 1.5.0
- Minimum R
- ≥ 4.1.0
- Bundled data
- 15 KB / 3 files
- Download size
- 191 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("stringr")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.