r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
502 stars 140 forks source link

FR: add standalone-stringr.R #1638

Closed olivroy closed 1 year ago

olivroy commented 1 year ago

Hi, I was wondering if it would be possible to add a standalone-stringr,R

I am used to working with stringr interactively, and in data analysis.

However, in packages, I don't necessarily want to add a stringr dependency. But I don't really like having to go back to base R functions. (although this vignette helps https://stringr.tidyverse.org/articles/from-base.html)

In knitr, they did some work. https://yihui.org/en/2023/01/knitr-stringr/ yihui/knitr#2205, https://github.com/yihui/knitr/blob/master/R/utils-string.R

Happy to contribute if you think it can be useful.

hadley commented 1 year ago

This is out of scope for rlang, sorry. It's possible I might one day finish off https://github.com/hadley/stringb, but it's hard to get the balance of matching stringr's interface while not having to write tons of code.