Skip to content

Commit

Permalink
NEWS for find* on Vector of U/Int8
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Sep 13, 2020
1 parent cb01268 commit ff679b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ New language features
* The library name passed to `ccall` or `@ccall` can now be an expression involving
global variables and function calls. The expression will be evaluated the first
time the `ccall` executes ([#36458]).
* `findfirst`, `findnext`, `findlast`, and `findall` now support arguments `(pattern, array)`
where `pattern` and `array` are `AbstractVector{<:Union{Int8,UInt8}}` (mix allowed) ([#37283])

Language changes
----------------
Expand Down
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 ff679b0

Please sign in to comment.