Skip to content

Commit

Permalink
string: improve error message for in -> occursin (JuliaLang#41783)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychen94 authored Aug 4, 2021
1 parent 32b1141 commit e57dc3d
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 @@ -641,4 +641,4 @@ The returned function is of type `Base.Fix2{typeof(occursin)}`.
"""
occursin(haystack) = Base.Fix2(occursin, haystack)

in(::AbstractString, ::AbstractString) = error("use occursin(x, y) for string containment")
in(::AbstractString, ::AbstractString) = error("use occursin(needle, haystack) for string containment")

0 comments on commit e57dc3d

Please sign in to comment.