Skip to content

Commit

Permalink
occursin doscstring correction (#27504)
Browse files Browse the repository at this point in the history
I think that `occursin` have a reversed order of argument w.r.t contains. this fixes the argument order in the docstring description to match examples and code.
  • Loading branch information
DrKrar authored and ararslan committed Jun 9, 2018
1 parent 0ffde2f commit c9b2274
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 @@ -435,7 +435,7 @@ findprev(t::AbstractString, s::AbstractString, i::Integer) = _rsearch(s, t, i)
"""
occursin(needle::Union{AbstractString,Regex,AbstractChar}, haystack::AbstractString)
Determine whether the second argument is a substring of the first. If `needle`
Determine whether the first argument is a substring of the second. If `needle`
is a regular expression, checks whether `haystack` contains a match.
# Examples
Expand Down

0 comments on commit c9b2274

Please sign in to comment.