Skip to content

Commit

Permalink
Update base/strings/search.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
  • Loading branch information
Moelf and nalimilan authored Sep 2, 2020
1 parent 7c72ca5 commit 6931775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/strings/search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function _search(s::Union{AbstractString,AbstractVector{<:Union{Int8,UInt8}}},
idx = _searchindex(s,t,i)
if isempty(t)
idx:idx-1
elseif idx > firstindex(s) - 1
elseif idx >= firstindex(s)
idx:(idx + lastindex(t) - 1)
else
nothing
Expand Down

0 comments on commit 6931775

Please sign in to comment.