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

expose findfirst(pattern::AbstractVector{T}, A::AbstractVector{T}) where {T<:Union{Int8,UInt8}} #37280

Closed
stevengj opened this issue Aug 29, 2020 · 0 comments · Fixed by #37283
Labels
good first issue Indicates a good issue for first-time contributors to Julia search & find The find* family of functions

Comments

@stevengj
Copy link
Member

stevengj commented Aug 29, 2020

We already have a function _searchindex to search for subsequences of byte arrays. It would be nice to expose this by adding corresponding methods to findfirst and findnext.

Although the current _seardhindex implementation only accepts Vector arguments, it looks like the implementation doesn't depend on the storage format, so the function signature could be easily widened to AbstractVector{<:Union{Int8,UInt8}} arguments. (You'll need to replace the sizeof calls with length, and maybe use firstindex to support non 1-based indexing.)

(See also the discussion on discourse.)

@stevengj stevengj added search & find The find* family of functions good first issue Indicates a good issue for first-time contributors to Julia labels Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors to Julia search & find The find* family of functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant