Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

str_[starts|ends] #258

Closed
hammer opened this issue Sep 25, 2018 · 3 comments
Closed

str_[starts|ends] #258

hammer opened this issue Sep 25, 2018 · 3 comments
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@hammer
Copy link

hammer commented Sep 25, 2018

Maybe not worth the API bloat, but I think regex-phobic users might like to have str_starts(string, prefix) as an alias for str_detect(string, "^prefix") and str_ends(string, suffix) as an alias for str_detect(string, "suffix$").

For some evidence of need, Does R have function startswith or endswith like python? has quite a few upvotes.

I know we have startsWith and endsWith in base R; I just prefer to stay in the tidyverse!

@gagolews
Copy link
Contributor

note stringi has stri_endswith and stri_startswith

@hadley hadley added feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day labels Jan 4, 2019
@hadley
Copy link
Member

hadley commented Jan 4, 2019

I like the idea, and implementation will be straightforwar

@jonthegeek
Copy link
Contributor

Claiming this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

No branches or pull requests

4 participants