Skip to content

str_[starts|ends] #258

@hammer

Description

@hammer

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementtidy-dev-day 🤓Tidyverse Developer Day rstd.io/tidy-dev-day

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions