Skip to content

Bring back contains(haystack, needle) #35031

@oxinabox

Description

@oxinabox

Right now we have:

  • startswith(haystack, needle)
  • endswith(haystack, needle)
  • and occursin(needle, haystack)

While occursin(needle, haystack) is right from the perspective of reading
f(a, b) as a f b
i.e. needle occursin haystack

It is not consistent with startwith or endswith.

Back in julia 0.6 (IIRC) we had contains(haystack, needle)
which still reads right: haystack contains needle.

I would like to suggest we bring it back so that we can have that consistency.


This is part of a series of issues relating to invenia/Wrangling.jl#3
Will link others below for cross referencing.
#35032
#35033

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions