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

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

Copy link
Contributor

gagolews commented Sep 29, 2018

note stringi has stri_endswith and stri_startswith

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Jan 4, 2019

I like the idea, and implementation will be straightforwar

@jonthegeek

This comment has been minimized.

Copy link
Contributor

jonthegeek commented Jan 19, 2019

Claiming this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment